Regular expressions

Ant Renamer uses the TRegExpr library. You can find a syntax reference on the site dedicated to this library. These expressions are quite complex but also quite "standard", so I won't make here a detailed guide explaining how they work.

For the "Regular expression" action, you have to provide two values:

Lots of non-alphanumeric characters have a special meaning in regular expressions. To use them, the escape character is the backslash ("\"). This also applies to the "$" sign that has a special meaning in the "new name" field. If you need to use the backslash as a character (e.g. as path delimiter in the new name) you have to double it ("\\").

Examples

Swapping artist and title from mp3 file names:

Extract episode number and title from series video files with episode number as SnnEmm followed by title: