Find & Replace
Paste your text, enter what to find and what to replace it with, and PocketSpry replaces every match instantly in your browser. Plain text mode is exact, literal, and case-sensitive; regular expression mode uses JavaScript regex source with optional g/i/m/s/u flags and capture-group replacements. It always replaces all matches, never trims or cleans your text, and your text and patterns are not sent to PocketSpry’s AI service.
Find and replace text instantly
Paste your text, enter what to find and what to replace it with, and PocketSpry replaces every occurrence locally in your browser — no sign-up, no upload, and no waiting on a server.
Plain text or regular expressions
Plain text mode does literal, case-sensitive replacement. Regular expression mode takes JavaScript-style regex source plus optional flags, for pattern-based replacement.
Replace all matches
The tool always replaces all matches — there is no replace-first or step-through mode.
Delete matching text
Leave Replace with empty to delete every match instead of replacing it.
Plain text stays literal
In Plain text mode, regex metacharacters like . * [ ] ( ) are matched literally, and replacement tokens like $1 have no special meaning — a Find of a.b matches the exact text “a.b”, not any character between a and b.
Regex capture replacement
In Regular expression mode the replacement supports $& (the whole match), $1–$99 (numbered capture groups), $<name> (named capture groups), and $$ for a literal dollar sign. The before-match and after-match tokens ($` and $') are not supported in this version and are treated literally.
Regex flags
Regular expression mode accepts the flags g, i, m, s, and u. Global replacement is automatic, so you do not need to add g yourself (it is accepted if you do).
No matches
If nothing matches, the original text is returned unchanged — that is a successful result, not an error.
Safe regex execution
Regex replacement runs in the background, isolated from the page, and stops with a timeout if a pattern takes too long — so a slow or catastrophically backtracking expression can never freeze the tool. All of this still happens locally in your browser.
Private and browser-local
Your text, the find pattern, and the replacement stay in your browser — including the background worker that runs regex replacement. Nothing is sent to PocketSpry’s AI service or to analytics.
Find & Replace vs Regex Tester
This tool transforms text. If you want to inspect or debug a regular expression — see what it matches, its capture groups, and positions — use the Regex Tester instead.
Frequently asked questions
- What does Find & Replace do?
- It replaces text you search for with new text, in your browser.
- Does it replace every match?
- Yes. Every replacement is replace-all.
- Can I delete matching text?
- Yes — leave Replace with empty.
- Is Plain text case-sensitive?
- Yes.
- Does Plain text treat . or * as regex?
- No — in Plain text mode they are matched literally.
- Is $1 special in Plain text mode?
- No — it is inserted literally.
- Can I use regular expressions?
- Yes — choose Regular expression as the mode.
- Do I include /.../ regex delimiters?
- No — enter the regex source only, without slashes.
- Which regex flags are supported?
- g, i, m, s, and u.
- Do I need the g flag?
- No — replace-all is automatic, but g is accepted.
- Can I use capture groups in replacements?
- Yes — $1 through $99.
- Can I use named capture groups?
- Yes — $<name>.
- Which replacement tokens are supported?
- $$ (literal $), $& (whole match), $1–$99 (numbered groups), and $<name> (named groups).
- What happens if my regex is invalid?
- You get a clear validation message — no stack trace.
- What happens if my regex takes too long?
- The background worker is stopped and you get a timeout message; the page never freezes.
- Can a regex match the start or end of a line?
- Yes — use anchors like ^ and $ with the m flag.
- What happens if nothing matches?
- Your original text is returned unchanged.
- Can I replace spaces or newlines?
- Yes.
- Does it trim or clean my text?
- No.
- Does it change capitalization?
- Only if your replacement text does so explicitly.
- Does it upload my text?
- No. Everything is processed locally.
- Is my text sent to AI?
- No. This tool does not use AI and makes no server or AI call.
- Does PocketSpry send my text, pattern, or replacement to Plausible?
- No. Your content and settings are not sent to analytics.
- What is the maximum text size?
- 200,000 characters.
- Is the result AI generated?
- No. It is computed deterministically in your browser.