Page 1 of 1

How to insert brakets

PostPosted: Wed May 27, 2020 1:38 pm
by jimbee
I have hundreds of video files which names include the year of production. I need to put such date between brakets.
Example: "Movie 2020.mkv" to become "Movie (2020).mkv" or "Oldmovie 1980.mkv" to become "Oldmovie (1980).mkv".
Thanks for your help

Re: How to insert brakets

PostPosted: Wed May 27, 2020 4:38 pm
by therube
Much like, viewtopic.php?f=3&t=4902&p=13276#p13276.

(.*) match anything
\s a space
(\d\d\d\d) four digits

1:RegEx
Code: Select all
Match:  (.*)\s(\d\d\d\d)$
Replace:  \1 (\2)


Match anything, up to a space followed by 4 digits (where the digits are the last characters in the file name).
Copy everything, only enclose the 4 digits in parenthesis.