Replace words or patterns in pasted text and see how many changed. Nothing leaves your browser.
By default Find is plain text: every character means itself, so a dot is a dot and a plus sign is a plus sign. Case sensitive is off, so cat also finds Cat and CAT. Turn it on and only the exact case matches. Whole word is on by default. A match then counts only when the characters just before and after it are not letters, digits or underscores, so cat is replaced in the cat sat but not in category or in concatenate. Accented and non-Latin letters count as letters too, so café is not matched by caf. Turn Whole word off to replace inside words. An empty Find box changes nothing and shows a note instead.
Turn on Use regular expression and Find is read as a JavaScript pattern, so \d+ finds runs of digits and (\w+) (\w+) finds two words. In the Replace box, $1 and $2 insert what the groups matched, $& inserts the whole match, and \n and \t insert a line break and a tab. In plain mode the Replace text is used exactly as typed, so a dollar sign is just a dollar sign. With Whole word on, your pattern is wrapped as a unit, so cat|dog means the word cat or the word dog. A pattern that cannot be compiled shows a fixed message and no result. The message never repeats your pattern.
A pattern that can match nothing, such as x*, is allowed. It matches between every pair of characters, so replacing it with a dash puts a dash around each letter, and each of those counts as a replacement. Regular expressions are held to three limits, because some patterns take exponential time on some text, which is called catastrophic backtracking. In regular expression mode the pattern runs in the background and is stopped after 1.5 seconds; plain mode runs on the page. First, in regular expression mode the text may hold at most 100,000 characters; longer text shows a message and nothing runs, while plain mode takes up to 1,000,000. Second, a pattern is refused with a fixed message, which never repeats the pattern, when a group that already repeats (with +, * or {n,}) or chooses between options with | is itself repeated with +, * or {n,}, as in (a+)+, (a*)* or (a|aa)+. Third, a pattern with two or more open-ended repeats in a row that overlap is refused, such as .*.*, .+.*, \s*\s* or (.*)(.*). The check is deliberately cautious, so it also refuses harmless patterns of those shapes such as (cat|dog)+. Write [ab]+ instead of (a|b)+, or a bounded repeat such as {1,3}. It does not catch every slow pattern, for example .*x.*y on a long line. Those are handled by the time limit: a pattern still running after 1.5 seconds is stopped and the page says This pattern took too long and was stopped, while the page stays responsive. Regular expression mode needs a browser with background workers; without one the tool says so. A result larger than 5,000,000 characters is refused with a message, and that size is counted as the replacements are built, so a pattern that deletes text is not refused for its match count.
Only matches change. Everything else is copied as typed, including trailing spaces and a final line break. Windows and old Mac line endings are read as plain line breaks, so the result uses one kind. The count shows how many replacements were made, which is the number of matches found. Your text is processed in this tab and is not uploaded or stored. Your Find and Replace entries and toggles are remembered in this browser, so avoid typing private details into those two boxes.
Leave Whole word on, which is the default. Then cat is replaced in the cat sat but not in category or cats. Turn it off to replace inside words as well.
Turn on Use regular expression, set Find to (\w+) (\w+) and Replace to $2 $1. John Smith becomes Smith John. Turn Whole word off if the words are part of longer text.
The pattern could not be compiled, usually from an unclosed bracket such as [abc, an unclosed group such as (ab, or a stray backslash at the end. Fix it or turn the regular expression option off to search for the text literally.
Yes. With regular expression on, set Find to \n and Replace to a space, or set Find to a comma and Replace to \n to put each item on its own line. To join wrapped paragraphs, the line break remover does it without a pattern.
Yes in plain mode, up to 1,000,000 characters per paste, and plain replacements finish at once. With regular expression on the limit is 100,000 characters, and patterns that repeat a group that already repeats are refused. Regular expressions run in the background and are stopped after 1.5 seconds if they are still working.