Find and Replace

Literal replace, with the count.

Literal replace, with the count.

How to use it

  1. Paste the text. Up to five million characters.
  2. Type what to find. Exactly as it appears. Nothing is treated as a pattern.
  3. Set the options. Case, whole words, and whether to stop after the first.

When you would use this

Find and replace is one of the two or three things people most want a text tool for, and the version that hands your text to a server is the version that is easy to write. This one runs in the page and treats what you type as exactly what you typed. That sounds obvious and it is the main way these tools go wrong: a search implemented as a regular expression turns a full stop into a wildcard, so searching for a.b quietly replaces axb as well. Every character is escaped here, on both sides, so a dollar sign in the replacement stays a dollar sign instead of becoming a group reference. Whole words only is applied intelligently rather than always. Wrapping word boundaries around a search that starts with a bracket produces a pattern that can never match, so the boundaries are only added when the search begins and ends with a word character. Otherwise the tool would report nothing found and give no clue why. The count of replacements is shown, which is the quickest way to notice that a search matched far more or far less than you expected.

Questions

How is this different from the regex version?
Everything you type is literal here. Searching for a.b finds those three characters and not axb, and a dollar sign in the replacement stays a dollar sign rather than becoming a group reference. Use the regex tool when you want patterns, and this one when you want exactly what you typed.
What does whole words only do?
Requires a word boundary either side, so cat matches cat but not cats or concatenate. It is only applied when your search starts and ends with a word character, because a boundary next to a bracket never matches and the tool would silently find nothing.
Is my text sent anywhere?
No. It runs in the page, which matters because find and replace is usually run on the real document rather than on a sample of it.