Seperate a format in rows
-
Hello all,
So I have this kind of format of numbers and texts on my notepad++ document and I’d like to separate the the first part which is the numbers than the second part which is from @ until the ; and the last part from ; and the last and i want them in 3 different notepads? It’s kind of complicated if a lot, thank you if this is possible.123.456.78.0:22000@Name\Name123;name
12.3.456.789:10000@NAME\Name-1;Name2017 -
If I were you I’d create 3 new copies of your data in 3 new Notepad++ tabs.
Then taking each new tab in turn, do the following:
Tab #1
Find what zone:
^([^@]+)@(?-s).+
Replace with zone:\1
Wrap around checkbox: ticked
Action: Press Replace All buttonSample results:
123.456.78.0:22000 12.3.456.789:10000Tab #2
Find what zone:
^[^@]+@([^;]+);(?-s).+
Replace with zone:\1
Wrap around checkbox: ticked
Action: Press Replace All buttonSample results:
Name\Name123 NAME\Name-1Tab #3
Find what zone:
(?-s)^.+?;(.+)$
Replace with zone:\1
Wrap around checkbox: ticked
Action: Press Replace All buttonSample results:
name Name2017Of course, all this keys upon the
@and;occurring in the data where the examples show…and nowhere else. It will need some changes if this is not always true -
Hello @ph0enix, @Scott-sumner and All,
if the general template of your data is always :
........@..........;......Here are, below,
3other possible regex S/R. Similarly to Scott’s post, you must select theRegular expressionsearch mode, tick theWrap aroundoption and click on theReplace Allbutton. Note that theReplace with:zone is always EmptyFirst regex :
SEARCH
(?-s)@.+REPLACE
EmptyResults :
123.456.78.0:22000 12.3.456.789:10000Second regex :
SEARCH
(?-s).+?@|;.+REPLACE
EmptyResults :
Name\Name123 NAME\Name-1Third regex :
SEARCH
(?-s).+;REPLACE
EmptyResults :
name Name2017Best Regards,
guy038
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