Loading Shrinkify...
Loading Shrinkify...
Use regular expressions to find and replace text patterns. Support for capture groups, backreferences, and flags.
Enter a pattern to see token explanations.
Live preview compares before/after per line and highlights changes.
Line 1
Before: ∅
After: ∅
Pattern-based find-and-replace restructures text that simple string replacement cannot handle. The Regex Replace tool tests substitutions live with capture group references, so you see the result before running transformations on real data.
$1 / $<name> — Insert captured group in replacement$& — Insert entire matched string$` / $' — Insert text before/after matchUse $1, $2 for positional groups or $<name> for named capture groups in the replacement string.
Yes. Add the i flag to your regex pattern to match regardless of letter case.
Add the g flag to your regex. Without it, only the first match is replaced.
Check out our technical guides to learn more about how browser-side processing works.
Read Glossary