How Find and Replace works
Find and Replace runs a substitution over every line (or every match, when regex mode is on). Plain mode replaces literal substrings; regex mode interprets JavaScript regular expressions so you can capture groups, anchors, and backreferences. The tool always replaces globally — there is no implicit "first match only". Backreferences like $1, $2 reflect groups captured in the regex.
How to use
Type the find pattern, the replacement string, and pick the flags you need. Toggle regex mode for patterns like \bfoo\b or (\d+). The output updates live and shows every change so you can verify before copying.
Frequently asked questions
How do I do a literal replace without regex?
Leave "Use regex" disabled. The find field then treats every character as a literal — including dots, asterisks, parentheses, and backslashes — so there is no risk of accidental pattern matches.
What backreference syntax is supported?
Use $1, $2, … in the replacement to refer to capturing groups in your regex. Use $& for the whole match. Double $$ to emit a literal dollar sign.
Is case sensitivity a regex flag or a separate option?
Both. You can pass the standard regex flag /i, or toggle the case-insensitive checkbox — they are equivalent. Pick whichever is more readable.
Will a runaway regex lock up my browser?
Catastrophic backtracking patterns (like (a+)+ on long "a…" inputs) can hang the tab. The tool catches invalid or runaway patterns and surfaces an error rather than freezing. If you suspect you have written one, test on a small sample first.
Can I do replacements across multiple files?
No — the tool works on a single pasted blob at a time. For multi-file refactors, run sed, perl -pi, or your IDE's project-wide find-and-replace instead.