Replace a literal text fragment or a JavaScript regular-expression match. Preview the number of matches before changing the text, especially when a short pattern could affect names, URLs or code.
How to use this tool
- Paste the source text and fill in Find and Replace with.
- Choose literal or regex matching and whether to replace all matches.
- Select Replace, inspect the changed text, and copy it when correct.
How to interpret the result
Matching is case-sensitive. Regex mode interprets special pattern characters and replacement references; literal mode treats the find text literally. Keep a source copy because replacement changes the working text. Test complex patterns on a small excerpt first.
Frequently asked questions
Why did a dot match more than a dot?
In regex mode a dot is a pattern token. Turn regex off for a literal search, or escape pattern characters according to JavaScript regular-expression syntax.