Tool guide
About this tool.
- Find & Replace searches the original input and builds new text from non-overlapping matches. Inserted replacements are not searched again during the same run.
- Literal mode treats both Find and Replacement as exact text. Regex mode interprets a JavaScript pattern and lets you choose literal replacement or JavaScript substitution tokens.
- Rename repeated words or literal punctuation without treating them as regex syntax.
- Remove text with an empty replacement, or replace only the first occurrence.
- Rearrange regex captures with numbered or named replacement tokens.
- Inspect changed lines and line endings before copying, replacing input or saving.
Paste source text and a Find value or apply a complete sample. Empty source is valid; only literal mode requires nonempty Find.
Choose literal or regex matching, letter-case sensitivity and First or All matches.
In regex mode, choose extra flags and replacement interpretation explicitly. Use Regex Tester to inspect captures or unfamiliar patterns.
Run and inspect the Changes view. It shows before/after line bodies and terminators; Copy and Save still use exact replaced text. JSON audit exports source, result, counts, options and available comparison instead.
Changing input or fields invalidates the old result. Save replaced-text.txt or choose JSON audit and save replacement-report.json. Samples reset all eight fields.
- Literal find "." with replacement "!": a.b.c → a!b!c; periods only, not every character.
- Literal replacement "$&" for find ".": a.b.c → a$&b$&c; the match is not repeated.
- Default case-insensitive find "tools" with replacement "world": Hello tools, TOOLS → Hello world, world.
- Regex (\w+), (\w+) with tokens $2 $1: Lovelace, Ada → Ada Lovelace.
- Regex ^ERROR: with extra flags mu and replacement WARN:: ERROR: one / INFO / ERROR: two → WARN: one / INFO / WARN: two.
- Empty replacement for find "remove": remove → an empty result.
- Web, desktop view and VS Code webview use a fresh isolated worker, stopped after two seconds including startup. Timeout produces no partial result and later runs use a fresh worker. Synchronous programmatic consumers must provide their own deadline/isolation for regex patterns.
- Literal mode treats special characters as text and always uses Unicode matching. Hidden regex-only settings are ignored. Case-insensitive matching follows JavaScript RegExp semantics, not language-specific casing or full Unicode case folding.
- Regex mode uses JavaScript, not PCRE or Python. g and i are derived from occurrence/case controls; extra flags accept m s u v only. Feature support, including v, depends on the installed runtime.
- First means one leftmost match. All means successive non-overlapping matches in the original source; it never repeatedly processes newly inserted text. Empty regex and other zero-width patterns advance correctly under the selected Unicode mode.
- Token substitution uses the same collected matches as counting. Missing captures follow JavaScript rules; $$ inserts a dollar sign. Literal replacement disables every substitution token even in regex mode.
- Input is limited to 100,000 UTF-16 units, Find and Replacement to 4,000 each, literal matches to 10,000, regex matches to 1,000 and result to 1,000,000 units. Oversized or invalid input is rejected without silent truncation.
- NUL and unpaired surrogates are rejected in input and output. Without u/v, regex patterns can split emoji into surrogate units; choose Unicode mode if a replacement would leave an invalid half-character.
- Unmatched text, spaces and line endings remain exact. Matching a line terminator or supplying actual newlines in Replacement can intentionally change line structure. No escaping, trimming, normalization or code syntax validation is performed.
- Untouched samples and VS Code source drafts retain raw CR/LF terminators. Edited browser textareas normalize newlines to LF, including Find and Replacement fields.
- Comparison displays 100 aligned rows at a time. If its text, line or diff-complexity budget is exceeded, replacement still succeeds; the exact result and comparison-unavailable reason remain in the audit.
- A match count is the number of replacement operations, not necessarily changed characters or rows. An identical replacement can leave the result unchanged. Audit files contain the original source and replacement result; TXT files contain only exact output.