Text tools
Find and Replace Text: Whole Words and Regex
Replace literal text or regular-expression matches locally. Choose case-sensitive or whole-word matching and see the replacement count.
How to use Find and Replace Text
- Paste the original text and enter a nonempty search term.
- Enter replacement text. Select case-sensitive, whole-word or regular-expression search as needed.
- Run, check the match count, then copy or download the updated text.
Example
Replacing cat with dog in Cat cat category, using whole-word matching without case sensitivity, produces dog dog category.
Limits and troubleshooting
Replacement text is literal: $& is inserted as $&, not interpreted as a capture-group expression. Whole-word boundaries use Unicode letters, numbers and underscores. Inputs are limited to 200,000 characters; patterns stop after 1.5 seconds.
Continue your workflow
Regex Tester: JavaScript Matches With Time Limits · Remove Duplicate Lines · Case Converter Online
Questions and answers
Can I use regular expressions?
Yes, enable regular-expression search. JavaScript regex syntax is used; pathological patterns time out in a worker.
Can I replace matches with nothing?
Yes. Leave the replacement empty to delete each match.
Related tools