Power users often have a set of regular-expression replacements they want to run together, in order.
Text Replacer with Rules applies a list of regex rules, one per line, each as a pattern and a replacement.
How to use Text Replacer with Rules
- Paste the text you want to transform into the input box.
- Enter one regex rule per line as pattern arrow replacement, in the order they should run.
- Copy the transformed text after all rules have been applied.
Use cases
- Running a saved set of regex clean-ups on pasted text.
- Applying ordered pattern replacements in one pass.
- Normalising text with several regular-expression rules.
Good to know
Text Replacer with Rules reads one rule per line as a pattern, an arrow, then the replacement, and applies them in order as regular expressions. Because order matters, an earlier rule can change what a later pattern matches. An invalid pattern on a line is reported and that line is skipped.
Frequently asked questions
How are the regex rules written?
Each line is a pattern, an arrow, then the replacement, and the patterns are applied as regular expressions in order.
Why does rule order matter?
Rules run top to bottom, so a change made by an earlier pattern can alter what a later pattern is able to match.
What happens with an invalid pattern?
The tool flags the offending rule by line and skips it, applying the remaining valid rules.