Regular Expressions

Bulk Rename Utility

Regular Expressions

Top  Previous  Next

The applications support powerful Regular Expression processing. This allows you to enter a flexible Match expression, and a flexible Replacement expression, and the program will generate the appropriate name using these expressions. For example, you can use RegExp strings to swap two words in a filename, or remove numbers, or apply fixed formatting.


A full description of Regular Expressions is beyond the scope of this help file, but a wide range of resources is available on the internet (e.g. However, the syntax supported by this program is the same as that offered by PERL 5. The precise implementation is via the PCRE Library, and (at the time of writing) full notes on the Perl Regular Expression syntax can be found here.


A summary of the syntax is:





Matches the previous character zero or more times


Matches the previous character one or more times


Matches the previous character zero or one times


Matches any single character except the newline


Matches the start of the input


Matches the end of the input


Matches either first or second character listed


Matches pattern


Matches exactly number times


Matches number, or more, times (note comma)

{num1, num2}

Matches at least num1 and at most num2 times


Matches any character listed between the [ ]


Matches all characters except those listed between the [ ]


Matches any characters in the specified range (a,b,c,d,e)


Matches all characters except in the specified range


Signifies that the next character is special or a literal.


Matches only on a word boundary


Matches only inside a word


Matches only on a form feed character


Matches only on a new line


Matches only on a carriage return


Matches only on a blank space


Matches only on nonblank spaces


Matches only on a tab


Matches any digit



Replacements are usually performed on the basis of "components, and these are defined using \ notation, e.g. \1 matches the first element, \2 matches the second


Example Regular Expression:


Match:                (Louis Armstrong)(.\[0-9].)([A-Za-z ]*)

Replace:        \1 \3



A more detailed working example can be found here.


You can choose whether or not to pass the filename extension to the Regular Expression engine, or just the filename itself.