A Better Finder Rename allows you to use an advanced technique called “Regular Expression Substitution” to replace text segments.
This is an advanced technique which requires a certain familiarity with programming concepts and may thus prove inappropriate for novice computer users.
The feature is available via the Replace regular expression and the
Re-arrange using regular expressions actions in
the Advanced & Special category. The help topics for either action contain a mini-tutorial on how to get started.
An overview of basic regular expression syntax is available in the Basic Regular Expression Syntax help topic.
Regular expression support has been a feature of the program for several decades, so there are many people who have existing regular expressions that they have written a long time ago.
The re-arrange using regular expressions action therefore has a Use Legacy Library checkbox that is turned on by
default and defaults to using the old regular expression library which is based on the
RegexKitLite framework, which has not been updated since the 2010s.
The full supported syntax for that version is documented on the ICU website.
There are number of good regular expression tutorial available on the internet:
Unticking the Use Legacy Library checkbox in Re-arrange using regular expressions, will activate the latest Swift-
based regular expression library that supports many modern features and adds case conversion capabilities.
The Replace using regular expressions action always uses the new library.
You can change the case of matched text directly in the replacement pattern using special escape sequences. These modifiers let you apply uppercase or lowercase transformations without external commands. The key sequences are:
\L — convert all following characters to lowercase until \E\U — convert all following characters to uppercase until \E\l — lowercase only the next character\u — uppercase only the next character\E — end any ongoing case conversionThis features requires that the modern library be switched on.
\U(.*)\E makes apple into APPLE\u(.*) makes apple into Apple