I have lines like that:
example1:example2:example3
example1:exa5:exa8
And I'd like to convert them into
example1:example3
example1:exa8
Is it possible to do that with regex?
Any help would be appreciated.
Thanks!
I have lines like that:
example1:example2:example3
example1:exa5:exa8
And I'd like to convert them into
example1:example3
example1:exa8
Is it possible to do that with regex?
Any help would be appreciated.
Thanks!
 
    
    In Find what use:
(?<=:)[a-z0-9]+:
Replace with empty string.
The expression:
(?<=:) Positive lookbehind for :.[a-z0-9]+ Match lower case letters and numbers.: Match :. 
    
    :[^:\r\n]+(?=:)LEAVE EMPTYExplanation:
:           # a colon
[^:\r\n]+   # 1 or more any character that is not a colon or line break
(?=:)       # positive lookahead, make sure we have a colon after
Result for given example:
example1:example3
example1:exa8
