Searching for a specific string
-
Hello
I have a massive file that looks like this:
colbyy:babi5786 | Level = 1 | DD = 1 | CP = 4 | Refunds Remaining = 3 | Email Verified = false | Last visit = 7/23/2018 | TC = 0 | TS = 0
micky43565:wazzz23545 | Level = 6 | DD = 2478 | CP = 2 | Refunds Remaining = 3 | Email Verified = true | Last visit = 1/11/2017 | TC = 0 | TS = 0
.
.I would like to isolate and export just the usernames and passwords to a new file, looking like this:
colbyy:babi5786
micky43565:wazzz23545
.
.How could I do that?
Thanks in advance
Klemen -
On my phone, so cannot test… But my first attempt would be:
- File > Save As…
- Edit > Replace
- Find =
(?-s)^(.*?:.*?)(?=\h\|).*
- Replace =
$1
- Mode = regular expression
- Try it once with Find Next then Replace
- If it works, Replace All, else undo
For more on regex, see the FAQ
-
Works like a charm… :)
Thanks a lot!