You are not logged in.
Pages: 1
I have the following regex:
([a-z0-9]+)(&)([a-z0-9]+)
with a substitution of
$1 $2 $3
. It simply pads occurring ampersands with surrounding spaces. But in order for it to work on files with more than one ampersand I have to duplicate the rule several times.
Does renamer support a global flag to apply the substitution to ALL matches in the string? For instance with JavaScript you can enable the global flag like this:
([a-z0-9]+)(&)([a-z0-9]+)/g
I can't find any documentation for renamer that describes how to enable flags.
Is this possible? Could it be implemented in the future?
In the mean time I'm going to try PascalScript and see if that works out.
Thanks!
Offline
The "/g" modifier is not applicable in ReNamer's Regular Expressions rule because it is the default behaviour, i.e. find all matches.
However, there are some inline modifiers available that toggle features like case sensitivity and greediness. For example, "(?i)" turns on and "(?-i)" to turns off the case-insensitive modifier.
Some of these features are not yet documented in our wiki, but you can find more information here: https://regex.sorokin.engineer/regular_expressions/
Offline
Pages: 1