select a specific portion of text from .Log files



  • Hi guys,

    I need help with the following:

    I have Rec files in a directory ~\record\Lekgx\Rec.log (Lekgx - 1 to 2000)
    I have also Befund files in the same directory ~\record\Lekg*\Befund.txt (Lekg 1 to 2000)

    Rec.log looks like this:

    30/05/2008 09:57:23 Administrator Patient data/Patient ID: -
    30/05/2008 09:57:23 Administrator Patient data/Last name: -
    30/05/2008 09:57:23 Administrator Patient data/First name: -
    30/05/2008 09:57:23 Administrator Patient data/Date of birth: -
    30/05/2008 09:57:23 Administrator Patient data/Sex: -
    30/05/2008 09:57:23 Administrator Patient data/Indication: -
    30/05/2008 09:57:23 Administrator Patient data/Date of recording: -
    30/05/2008 09:57:23 Administrator Patient data/Pacemaker: -
    30/05/2008 09:59:49 Administrator Created in ~\record\Lekgx
    30/05/2008 10:00:15 Administrator Close
    09/06/2008 11:31:07 Administrator Open
    09/06/2008 11:32:06 Administrator Close
    17/06/2008 16:29:13 Administrator Open
    17/06/2008 16:30:47 Administrator Close
    29/07/2008 11:51:32 Administrator Open
    more date more time more users more action

    Befund.txt file looks like this:

    date
    text
    signature

    I need to make a nice Excel document with the Legk numbers, highlited patient info an befund texts.

    Please help

    Archie



  • @Arshavir-Ghahramanyan

    … and how exactly is this related to notepad++?



  • I need a regex to keep only the patient demographics in the log files and delete the rest



  • @Arshavir-Ghahramanyan said:

    I need to make a nice Excel document

    First off welcome to the Notepad++ community. Your initial post is very short on what you need, so much so that @Ekopalypse was right to ask what has this to do with Notepad++ (NPP). If he hadn’t I would have.

    We, on the forum, hope that posters would have attempted something, even if it’s just a sentence telling us what they’ve tried. It does not appear that you have attempted anything. Worse, you haven’t even given us an example of how you want your before data to appear after it has been processed by Notepad++.

    But just to show that I’m not completely unsympathetic I can offer up some suggestions. NPP can bookmark lines containing certain characters/text. In 2 runs you could bookmark lines containing “Patient” and “Created in”, then you can invert the bookmarks so ALL other lines are instead bookmarked, then delete those bookmarked lines leaving ONLY the lines you want.

    Terry



  • Hi Terry,

    Thank you very much.

    I am just very far from programming, our IT guru mate is on annual leave and I was stack with it. )) Thank you very much.


Log in to reply