Skip to content

Find & Replace

Find and replace text using plain text or regular expressions.

Last updated August 26, 2026

Text
Result (2 matches)

About this tool

This tool finds and replaces text across a block of content, supporting both plain-text matches and full regular expressions for pattern-based replacements — useful for bulk-editing code, cleaning up data, or reformatting text without opening a full editor. Options let you toggle case sensitivity and choose between replacing the first match only or every match in the text.

Code examples

The second line (where shown) is the inverse operation.

LanguageCode
JavaScripttext.replace(/dog/gi, 'cat')
Pythonre.sub(r'dog', 'cat', text, flags=re.IGNORECASE)
Shell (sed)sed 's/dog/cat/gi' file.txt

Frequently asked questions

What's the difference between plain text and regex mode?

Plain text mode treats your search term literally, escaping any special characters. Regex mode lets you use patterns like `\d+` (digits) or `^\s+` (leading whitespace) for more powerful, rule-based matches.

Why does my replacement only affect the first match?

Turn on “Replace all” — without it, only the first match in the text is replaced, matching standard regex behavior without the global flag.