Your files stay on your device

# Find and replace text

Find a word or pattern in your text and replace every match at once.
Loading editor…

Type what to find, and the result shows up here.
OptionsCopy result

## Literal text versus regular expressions

With literal mode on, every character matches only itself, so a dot finds a dot. Turn on regex mode and the same box reads the text as a pattern, where an unescaped dot matches any single character except a line break.

 colou?r Matches color and colour, because the u is optional
 \d+ One or more digits
 \. A literal dot, even in regex mode

## Escapes and whole-word matches

The usual mistake is leaving out an escape. In regex mode the pattern 1.5 also matches 1x5, so write 1\.5 when you mean a decimal point. Whole words only stops cat from matching inside category. Without that option, a plain search finds it there.

## More text tools

- [Compare two texts](/text/diff)
- [Regex tester](/dev/regex-tester)
[All text tools](/text)

Was this tool useful?
YesNo

---

Canonical HTML: https://nutter.tools/text/find-replace
Markdown version: https://nutter.tools/text/find-replace.md
Plain-text version: https://nutter.tools/text/find-replace.txt
Agent index: https://nutter.tools/llms.txt

