Find and Replace

Find and replace text with regex support.

Frequently Asked Questions

Does this tool support regular expressions?

Yes — toggle regex mode to use full JavaScript regular expression syntax for powerful pattern matching. You can use character classes, quantifiers, groups, lookaheads, and backreferences. The replacement string supports $1, $2, etc. for captured group substitution.

Can I do case-insensitive find and replace?

Yes — toggle the case-insensitive option to match regardless of letter case. "Hello", "hello", and "HELLO" will all be matched and replaced. In regex mode, this adds the "i" flag to your pattern automatically.

How can I replace with nothing to delete matches?

Leave the replacement field empty and all matches will be removed from the text. This is useful for stripping unwanted characters, removing HTML tags, deleting specific words, or cleaning up text by removing patterns you do not want.

Can I preview changes before applying them?

Yes — the tool shows a live preview highlighting all matches in the original text and displaying the result after replacement. You can review every change before copying the output. The match count is displayed so you know exactly how many replacements will occur.

What regex patterns are most commonly used?

Common patterns include: \s+ (multiple whitespace), <[^>]+> (HTML tags), \d+ (numbers), ^\s+|\s+$ (leading/trailing whitespace), and ([A-Z]) to $1 for inserting before capitals. The tool includes a regex cheat sheet for quick reference.