dukestravels07 wrote:I'm trying to enclose the year of a film from:
This: Alien Directors Cut 1979.mkv
To: Alien Directors Cut (1979).mkv
I've read up on the regular expression stuff, but can't get it to work. Seems like a simple one I know...
Any help appreciated. Thanks!
Is it always that? Only 4 digits like an year, or are there file names with other digits too?
FROM:
Alien Directors Cut 1979.mkv
TO:
Alien Directors Cut (1979).mkv
Do:
RegEx(1)
Match: (.+)(\d\d\d\d) ---or shorter: (.+)(\d{4})
Repla: \1(\2)
Explanation:
Match all signs, till 4 digits are found, store that "all" before the digits in an capture group and the 4 digits in an own group by using ( ) parentheses.
First ( )-group will match "Alien Directors Cut" and the second four digits: "1979"
To access the first capture in the
Replacement use \1, and for the digits group use \2.
Now add what you want in the replacement, as you want ( ) around the year use: (\2)