You are not logged in.
Example, adding parenthesis to before and after the matching year pattern / `\d{4}`:
Name:
Batman 1994
Superman (2003)
New Name:
Batman (1994)
Superman (2003)
I tried positive lookahead/behind but reNamer throws unrecognized modifier error
Offline
Hello and welcome.
The most simplest way is to add parenthesis to all years, if have parenthesis already or not,
and add next an Replace Rule (https://www.den4b.com/wiki/ReNamer:Rules:Replace)
to change doubled parenthesis by single one:
Find: ((*|*))
Replace: (*|*)
- - -
The regex syntax can be read there
https://www.den4b.com/wiki/ReNamer:Regular_Expressions
Right now no lookaround implemented.
- - -
You could use a "must no match" expression [^...]
FROM:
Batman 1994
Superman (2003)
TO:
Batman (1994)
Superman (2003)
USE:
Regular Expressions:
Expression: "[^(](\d{4})[^)]"
Replace: " ($1)"
[x] skip extension
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
The following two rules should do the job:
1) Regular Expressions: Replace expression "\b(\d{4})\b" with "($1)"
2) Replace: Replace all "((" with "(", "))" with ")"
Offline
Or you can use one rule:
1) Regular Expressions: Replace expression "\(?(\d{4})\)?" with "($1)" (skip extension)
TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!
Offline
It works! thank you @stefan @den4b @eR@SeR !!!
Offline