How to separate specific text with notepad?
-
Hello, @yuly-pmem, @ani-rodet, @terry-r and All,
Ah OK ! So, here are, below, all the regexes to achieve the suppression of
1
or2
columns, from an original3
-columns table, separated with colons (:
)Let’s imagine the initial
3
-columns table, below :cell A1:cell B1:cell C1 cell A2:cell B2:cell C2 cell A3:cell B3:cell C3
Then :
- With the regex S/R :
SEARCH
:[^:\r\n]+$
REPLACE
Leave EMPTY
Only columns
A
andB
remain :cell A1:cell B1 cell A2:cell B2 cell A3:cell B3
- With the regex S/R
SEARCH
(?-s):.+(?=:)
REPLACE
Leave EMPTY
Only columns
A
andC
remain :cell A1:cell C1 cell A2:cell C2 cell A3:cell C3
- With the regex S/R :
SEARCH
(?-s)^.+?:(?=.+:)
REPLACE
Leave EMPTY
Only columns
B
andC
remain :cell B1:cell C1 cell B2:cell C2 cell B3:cell C3
- With the regex S/R :
SEARCH
(?-s):.+$
REPLACE
Leave EMPTY
Only column
A
remains :cell A1 cell A2 cell A3
- With the regex S/R :
SEARCH
(?-s).+:(.+):.+
REPLACE
\1
Only column
B
remains :cell B1 cell B2 cell B3
- With the regex S/R :
SEARCH
(?-s)^.+:
REPLACE
Leave EMPTY
Only column
C
remains :cell C1 cell C2 cell C3
Cheers,
guy038
-