How to remove middle text?
-
Hello, @mary-soifaite,
Thanks for your different images. And, this confirms that, if we consider the general template :
STRING_1:STRING_2:STRING_3
You’re expecting two lists :
-
One with
STRING_1:STRING_2
, so, the first two fields -
One with
STRING_2:STRING_3
, so, the last two fields
Thus,
-
The former list should be obtained with this regex S/R :
-
SEARCH
^([^:\r\n]+):((?1)):((?1))
-
REPLACE
$1:$2
-
-
The later list should be obtained with this regex S/R :
-
SEARCH
^([^:\r\n]+):((?1)):((?1))
( idem as above) -
REPLACE
$2:$3
-
Of course, you must select the
Regular expression
search mode, tick theWrap around
option and, finally click on theReplace All
button !
Note that, instead of posting some images via an other site, you could have simply pasted the clipboard contents of your text, directly in your post area, by using the usual
Ctrl + V
shortcut : it’s easier for people to test regexes against your dataEven better : before pasting your text, click on the
</>
button, first, in order to insert code text !Best regards,
guy038
-
-
it can also be so
^([^:\n]+)(:)((?1))
\1