Regex Replace Tool
Transform text with a JavaScript regex and replacement string. Review the before and after previews, then copy or download the full result.
Replacement Progress
Source Text
Typed or pasted text uses LF line breaks. Open a TXT to retain its original bytes.
Replacement Rules
Enter the pattern without surrounding slashes.
g replaces every match. Leave g out to replace the first match.
Flags and Substitutions
i ignores case, m uses line anchors, s lets dot match a line break, u or v enables Unicode mode, y uses sticky matching, and d enables match indices within the engine.
$1–$99 numbered captures, $<name> named capture, $& whole match, $$ dollar, $` prefix, $' suffix.