Search and replace text with support for regular expressions, case sensitivity, and whole word matching.
Saved Presets is a Supporter feature.
Tool History is a Supporter feature.
Tool Notes is a Supporter feature.
Paste the text you want to search and replace in.
Enter the text or pattern to find and the replacement text.
Click replace and copy the result to your clipboard.
Uses JavaScript's string replace method with optional regular expression support for pattern matching.
Supports replace first occurrence, replace all, and case-sensitive/insensitive matching.
In basic mode, we use JavaScript's String.replaceAll() for simple substring replacement. In regex mode, we compile your pattern into a RegExp object and use String.replace() with the global flag. Capture groups in the pattern can be referenced in the replacement.
We use the same pattern to both highlight matches (by wrapping in styled spans) and perform replacements. This ensures the preview exactly matches what will be replaced. Match positions are calculated to correctly handle overlapping or adjacent matches.
Yes! Toggle the "Use Regex" option to search using regular expression patterns. This allows for powerful pattern matching like finding all email addresses or phone numbers.