When predefined rules aren't precise enough, regular expressions give you pattern-based control over renaming.
Alongside its predefined rename rules, Bulk Rename Utility includes a dedicated regular expression (regex) find-and-replace field. You supply a pattern to match text within each filename, and a replacement string — which can reuse parts of the match using capture groups. The live preview updates as you type, so you can confirm the pattern behaves correctly before applying it.
| Pattern | Replacement | What it does | Example |
|---|---|---|---|
^IMG_ |
Photo_ |
Matches "IMG_" only at the start of the filename and swaps it out. | IMG_0451.jpg → Photo_0451.jpg |
\s+ |
(single space) |
Collapses multiple consecutive spaces or tabs into one space. | Report Final.docx → Report Final.docx |
(.+)\.jpeg$ |
$1.jpg |
Captures everything before a .jpeg extension and rebuilds it with .jpg. |
sunset.jpeg → sunset.jpg |
(\d{4})-(\d{2})-(\d{2}) |
$3-$2-$1 |
Captures a YYYY-MM-DD date and reorders it to DD-MM-YYYY using capture groups. | 2026-03-14_notes.txt → 14-03-2026_notes.txt |
[^a-zA-Z0-9._-] |
_ |
Replaces any character that isn't a letter, digit, dot, underscore, or hyphen with an underscore. | Q3 Report (Final)!.pdf → Q3_Report__Final__.pdf |
Use ^ and $ to match the start or end of a filename specifically, instead of matching anywhere in the string by accident.
Try your pattern on a handful of files inside a copied test folder before running it against your full library.
A broad pattern can accidentally match and change the file extension. Reference or exclude the extension explicitly when needed.
Wrap the parts you want to reuse in parentheses and reference them as $1, $2, and so on in the replacement field.
Make sure your resulting filenames are actually safe on Windows.
Read Safe File Naming Tips