Removal of everything after a bracketed year

A swapping-ground for Regular Expression syntax

Removal of everything after a bracketed year

Postby Bryden42 » Sun Dec 12, 2021 12:07 pm

Hi all,

Most sincere apologioes if this has been answered before but i've undertaken a few searches and cannot find anything to assist.

I have some comic files that need renaming as an example:

Deep Beyond 10 (of 12) (2021) (Digital) (Zone-Empire)

I would like to rename these to remove everyting after the bracketed year, so:

Deep Beyond 10 (of 12) (2021)

I assume that this would need a rexEx(1) expression or could this be achieved through the 'crop after' tool?

Any assistance would be gratefully recieved.
Bryden42
 
Posts: 2
Joined: Sun Dec 12, 2021 12:02 pm

Re: Remove everything after bracketed year

Postby Luuk » Sun Dec 12, 2021 12:35 pm

With RegEx(1) the 'Match' and 'Replace' can be like...
(.* \((19|20)\d\d\)).*
\1

This does destroy everything after the last year like (19##) or (20##).
Luuk
 
Posts: 690
Joined: Fri Feb 21, 2020 10:58 pm

Re: Removal of everything after a bracketed year

Postby Bryden42 » Sun Dec 12, 2021 12:45 pm

Dear Luuk, You are a gentleman and a scholar!
Thank you so much.
Bryden42
 
Posts: 2
Joined: Sun Dec 12, 2021 12:02 pm


Return to Regular Expressions