Find and Replace — Bulk Text Substitution with Regular Expressions
Find and replace is one of the most powerful text editing operations. Beyond simple word substitution, enabling regular expressions (RegEx) allows pattern-based replacements: strip all HTML tags, normalize whitespace, convert date formats, extract specific text, or transform structured data in seconds. All processing happens locally in your browser — nothing is uploaded to a server.
Useful regex patterns:
\d+ → one or more digits / \s+ → one or more whitespace characters
[A-Za-z]+ → English letters only / ^.* → entire line
\b\w+\b → whole word match / (pattern) → capture group (reference with $1)
Common use cases:
— Remove HTML tags: find <[^>]*>, replace with nothing
— Normalize multiple spaces: find \s{2,}, replace with single space
— Convert commas to tabs (CSV→TSV): find ,, replace with \t
— Remove all numbers: find \d+, replace with nothing
When using regex, special characters (. * + ? ^ $ { } | ( ) [ ] \) must be escaped with a backslash when you want to match them literally. For example, to find a period use \. and for a parenthesis use \(. The error message will tell you if your pattern is invalid.
Frequently Asked Questions
A: Enable regex mode and use \n to match line breaks (LF). For Windows-style line endings (CRLF), use \r\n. To replace all line breaks with spaces, find \r?\n and replace with a space character. To join all lines into one, replace \r?\n with nothing.
A: With regex, use the | (OR) operator: (apple|orange|banana) will match any of the three. If replacing all with the same word, this works great. For different replacements per word, run the tool multiple times sequentially, or write a more specific pattern using capture groups and conditional logic.
A: With case sensitivity off (default), "Hello", "hello", and "HELLO" all match the search term "hello". With case sensitivity on, only an exact case match triggers a replacement. For code editing or when capitalization matters (like proper nouns), turn case sensitivity on.