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!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login