Hello @vinc-cser, @Peterjones, and All,
Peter, you beat me to it by a few minutes ;-)). I was thinking about these two solutions :
SEARCH (?-s)^(.+):.+
REPLACE \1
OR :
SEARCH :[^:\r\n]+$
REPLACE Leave EMPTY
Note that your solution :[^:]*$ does not work well when next line(s) does not contain any colon. For instance :
happylion3872:PIFMYJD8:9kjrgmdsjf4vxlc1dkc791fsd7f878
happylion3872:PIFMYJD8:9kjrgmdsjf4vxlc1dkc791fsd7f878
Some text
to see
the problem
happylion3872:PIFMYJD8:9kjrgmdsjf4vxlc1dkc791fsd7f878
So, to prevent grabbing multiple lines , use either :
My second solution :[^:\r\n]+$ , which does not accept End of line chars before an end of line
Your solution, slightly modified, :[^:]*?$ , which looks for the nearest “end of line” location !
@vinc-cser, beware that running twice, any of these regex S/R, would delete the part :PIFMYJD8, as well !
Best Regards
guy038