remove from year to end

A swapping-ground for Regular Expression syntax

remove from year to end

Postby shark » Thu Apr 11, 2019 11:43 pm

Hi,
I'm not able to delete all text after year in format (yyyy)

from
textbegin.2019 textend32
text with space or number82 @1982.totheend pp

to
textbegin.2019
text with space or number82 @1982

Please help me!
M.
shark
 
Posts: 1
Joined: Thu Apr 11, 2019 11:32 pm

Re: remove from year to end

Postby therube » Sun Apr 14, 2019 5:38 pm

This should retain everything up to the first set of 4-digits, not necessarily a "year".

1:Regex
Code: Select all
Match:  (.*?)(\d\d\d\d)
Replace:  \1\2



#seamonkey-20100302-120006.xml
#seamonkey-2010
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm


Return to Regular Expressions