Plain mode searches for the characters you typed
In plain mode the search box is escaped before it reaches the regular-expression engine, so 5.00 finds 5.00 and not 5x00, and (draft) finds those brackets rather than an empty capture group. The replacement is escaped too, which is why $1 typed into plain mode inserts a dollar sign and a one. That is the difference from the average online replacer, which either feeds both strings to a regular expression untouched or handles the search string and not the replacement.
Regex mode gives you the whole JavaScript syntax and the substitution tokens with it: $1 to $99 for numbered groups, $<name> for a named group, $& for the whole match and $$ for a literal dollar sign. Turning a column of Surname, First name around is one line: (\w+), (\w+) replaced by $2 $1.
What "whole word" really does
It wraps the pattern in \b, a boundary between a word character and a non-word one. That definition has a sharp edge most tools ignore: a pattern that starts or ends with punctuation has no word character on that side, so demanding a boundary there matches nothing at all. Searching for (x) with whole-word on would silently find zero results. Here the boundary is added only on the side where a word character actually sits, so the checkbox does what it looks like it does regardless of what you search for.
\b is defined on [A-Za-z0-9_] only, which is the JavaScript definition, not a Unicode one. So café and naïve have a word boundary in the middle as far as the engine is concerned. If accented text matters, leave whole-word off and write the boundary you mean in regex mode.
Why a regular expression runs on a background thread
A pattern with nested quantifiers, (a+)+$ being the classic, can take exponentially long on a string that nearly matches: 30 characters of input is already billions of paths through the backtracking engine. There is no way to interrupt JavaScript mid-match, so the only recovery is to run it somewhere that can be killed. Regex mode runs in a Web Worker with a one-second budget and the worker is terminated if nothing comes back, which is why a runaway pattern gives you a warning instead of a frozen tab. Plain mode cannot backtrack at all, so it runs inline and stays instant.
Common problems
- Nothing matched, but the word is right there. Almost always Match case, or a non-breaking space where you expected an ordinary one. Paste the text into the whitespace remover to find the invisible characters by name.
- It replaced part of a longer word. Turn on Whole word only. Replacing
catin a document containingconcatenateis the standard way to ruin an afternoon. - The replacement inserted something strange. A dollar sign in regex mode starts a substitution token. Write
$$for a literal one, or switch to plain mode, where it is escaped for you. - Line endings changed. They did not. The text is rewritten in place and untouched characters, CRLF included, come out exactly as they went in.
Frequently asked questions
Does my text get uploaded?
No. Everything runs in this tab, and nothing is sent anywhere. The text, the search string and the replacement are never written to the address bar or to browser storage either, which is a deliberate choice: only the four checkboxes travel in a shared link, so pasting one to a colleague cannot leak what you were editing.
How do I delete text instead of replacing it?
Leave the replacement box empty. Use the Matches view first, since a deletion is invisible in the result pane by definition and the highlight is the only way to see what is about to go.
Can I match across several lines?
Yes, in regex mode. Patterns run against the whole text rather than line by line, so \n matches a line break and [\s\S]*? spans lines without needing a dotall flag. For a full flag set, capture groups and an inline match table, use the regex tester.
How large a document can it handle?
2 MB, which is roughly 400,000 words. Past that the tool stops rather than freezing, since the work happens on your device instead of on a server.