by Admin » Thu May 06, 2021 12:40 am
Some info on Simple Regex
SIMPLE REGULAR EXPRESSIONS
Bulk Rename Utility 3.4 introduces Simple Regular Expressions, which can be enabled by switching on the option Simple in group RegEx (1).
Simple regular expressions work by matching text and then removing or rearranging the matched text.
The syntax is very simple, up to 9 matching tags can be used %1, %2, %3 until %9, which match a string of text. Examples:
Match: %1-%2
Replace: %2-%1
It will match first a string of text with %1 then the character '-' and then another string of text. It will then replace it with the second string of matched text, the character '-' and the first string of text matched. Effectively it will switch text around the character '-'.
Match: %1(%2)
Replace: %2
It will match first a string of text with %1 then a '(' and then another string of text followed by ')'. It will then replace it with the second string of matched text and the rest is dropped.
Match: %1-%2-%3 %4
Replace: %3-%2-%1 %4
It will match and reorder text such as '2020-03-12 Boston' into '12-03-2020 Boston'.
Match: %1%2%3%4
Replace: ABC%4
Replaces the first 3 characters with 'ABC'.
Up to 9 matching tags can be used : %1, %2, %3 until %9.