Help to arrange text??
-
Hi guys my problem may seems dumb but i was playing with notepad++ for 2 days and still cant seems to find how to do it :(
So my question is that i have a set of data arranged in raw text like this :
Name:Mourat
Age:65
Work:Carpenterand Because i have lots of data and for efficient time i would like fo it to be output like :
Mourat|65|Carpenter
Like all info in the same line separated by a | if you know how to do it please let me know would be glady appreciate :)
-
Hello, @parkourfinger and All,
- If each record consists of
3
consecutive fields only, use this regex S/R :
SEARCH :
(?-s)^.+:(.+)\R.+:(.+)\R.+:(.+)
REPLACE
\1|\2|\3
- If each record consists of several consecutive fields, use the generic regex S/R :
SEARCH
(?-is)(?:(
Title of the Last Field)|.+)
Value Separator(.+)\R?
REPLACE
\2?1\r\n:
Field Separator
In this present example as :
-
The Title of the Last Field is the word
Work
-
The Value Separator is the
:
punctuation sign -
The Field Separator is the
|
symbol
Hence the following regex S/R :
SEARCH
(?-is)(?:(Work)|.+):(.+)\R?
REPLACE
\2?1\r\n:|
As usual, select the
Regular expression
search mode and tick, preferably, theWrap around
option !Best Regards,
guy038
- If each record consists of
-
@guy038 Thank you very much it worked!