Find and Replace Tools

Text Replacer with Rules

Run find and replace rules with regular expression support.

PrivateYour text is processed on your device and never uploaded.
Input
Result
0 chars · 0 lines · 0 replaced

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

  1. Paste the text you want to transform into the input box.
  2. Enter one regex rule per line as pattern arrow replacement, in the order they should run.
  3. Copy the transformed text after all rules have been applied.

Use cases

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.

Related Find and Replace Tools