General Regex Templates Guide
The built-in Regex Templates in PDF Manager’s Search & Replace tool let you apply powerful renaming patterns instantly — no need to memorize syntax.
You can use templates:
- Standalone — apply one rule to quickly reformat files.
- In sequence — stack multiple templates for complex restructuring.
🛠 How to use a template
- Open Search & Replace.
- Click Show Templates.
- Select a template from the dropdown.
- The search and replace fields will be pre-filled.
- Review the preview table for changes.
📂 Available Templates
(\d{2})(\d{2})(\d{2})$2$120$3Dinosaurs are cool Ep No. 010225Dinosaurs are cool Ep No. 02012025When to use: Dates in ddmmyy or mmddyy format where you need to swap day/month and expand the year.
(\d{2})(\d{2})(\d{4})$2$1$3Words are weird Ep No. 01142025Words are weird Ep No. 14012025When to use: Dates in ddmmyyyy or mmddyyyy format where you need to swap day/month.
(\d+)$Ep No. $1Oops, I Did It Again 1001Oops, I Did It Again Ep No. 1001^(.+)\s\-\s(.+)\s\-\s(.+)$$1 $3 Ep No. $2THIS SHOW - 101 - Exists ProbablyTHIS SHOW Exists Probably Ep No. 101When to use: Files follow a Prod - EpisodeNum - EpisodeTitle format and need to be rearranged for cue-sheet conventions.
(\d{2}$)0$1What is a number 101What is a number 1001When to use: Episode numbers have only three digits and must be padded to four.
🔗 Stacking templates for more power
You can chain templates together to transform filenames in a single pass.
The order matters — earlier rules affect later ones.
Example stack:
- Reorder Tokens
- Zero Pad Episode Suffix
- Cue Sheet T1
Before: mary had a little lamb - 101 - and no one talks about it
After: MARY HAD A LITTLE LAMB And No One Talks. . . Ep No. 1001
💡 Common regex symbols (JavaScript)
.— any single character except newlines (unlesssflag is on);a.cmatchesabcora-c.*— 0 or more of the previous token;ab*matchesa,ab,abbb.+— 1 or more of the previous token;\d+matches7or123.?— 0 or 1 of the previous token (makes it optional);colou?rmatchescolororcolour.{n}— exactly n repeats;{n,}— n or more;{n,m}— between n and m;\d{4}matches2025.^— start of string/line;$— end of string/line;^Intromatches only if the line starts withIntro.\ddigit,\wword character (letters/numbers/underscore),\swhitespace;\w+\s\w+matches two words.[abc]any of these characters;[a-z]ranges;[^...]negated class;[^0-9]+matches non-digits.|alternation (OR) between patterns;cat|dogmatchescatordog.()capturing group;(?:)non-capturing group;(ep)\s(\d+)capturesepand the number.(?=...)positive lookahead;(?!...)negative lookahead;\d(?=pm)matches digits beforepm.\bword boundary;\Bnon-boundary;\bcat\bmatches whole wordcat.- Escape special characters with
\like\.or\+to match them literally;v1\.2matchesv1.2.
If you need a new preset template, reach out via the TūlBOX support links!