FAQ
Is regex supported?
Yes. Enable regex mode and use group references such as $1 to insert captured fragments into the replacement.
Can I replace only the first match?
Yes. Turn off Replace all and only the first match changes, handy for editing one occurrence in a heading.
Is the number of replacements shown?
Yes, counted live so you can confirm nothing was missed or replaced by mistake.
About this tool
The two modes differ in exactly one place: Plain escapes the regex metacharacters in your search text (. * + ? ^ $ ( ) [ ] { } | \), so price(USD) matches literally; Regex compiles your input as-is, and an invalid pattern shows a red "regex error" with the engine's own reason instead of silently returning the input unchanged.
The most common trap: $ in the replacement is always special, whether or not you are in regex mode, because the work is done by String.replace. In plain mode typing $1 does not insert a literal "$1" — it references capture group 1, which plain mode does not have, so you get an empty string. Write $$ for a literal dollar sign and $& for the whole match. That is why replacing with 100$ yields 100.
Put only the expression in the search box — no /.../gi delimiters or flags. Case-insensitivity and replace-all are controlled by the two checkboxes, and delimiters typed into the box are treated as literal characters. Replacement is a single pass, so swapping A→B and B→A never loops; it also cannot be done in one step (use a temporary placeholder, then a second pass).
"Replace all" is on by default; turn it off to change only the first match. The counter reports actual matches, and with case-insensitivity on, both ABC and abc count. The search box is single-line, so plain mode cannot match a newline — switch to regex mode and use \s+ or [\s\S]*? to work across lines.