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_3You’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 expressionsearch mode, tick theWrap aroundoption and, finally click on theReplace Allbutton !
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 + Vshortcut : 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
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