Skip to content
OddsockLocal
Local
Source text

Formatting

5 wordsRuns in this browser. Nothing is uploaded.

How to use

  1. Paste the text.
  2. Type the Find text. An empty box is an error.
  3. Type the replacement. In literal mode, $ is a dollar sign.
  4. Leave Match on literal, or switch to regex if you need groups.
  5. Turn case sensitive off only when Socks and socks should both change.

What is Find and replace?

Find and replace is a search you can see, then a substitution. Leave Find empty and the page stops with “Enter text or a pattern to find.” It will not pretend to rewrite the sentence. With Find set to socks and Replace with set to gloves, “Odd socks in the dryer.” becomes “Odd gloves in the dryer.” The capital O, the spaces, and the period stay.

Read more

Match opens on literal, and case sensitive opens on yes. Literal mode looks for those exact characters. A dollar sign in the replacement is a dollar sign. Replacing socks with $& inserts the characters $&, not the text that was found. Turn case sensitive off and Socks and socks both match, still with a literal replacement. Regex mode is the other match. Find (\d+) and replace with [$1] turns “12 34” into “[12] [34]”. In regex mode the replacement is a pattern, so $1 means the first group. An invalid pattern fails instead of changing the text.

Every match is replaced, not just the first. The flags are global. There is no “nth hit” control. If you needed to see the hits without changing them, a regex tester lists matches. This page returns the rewritten string.

Use cases

  • An editor swapping a product name in a paragraph.
  • A developer wrapping every number in brackets with a capture group.
  • Someone who almost inserted $& and needed the literal dollars to stay.
  • A writer turning off case sensitivity so Socks and socks both change.
  • A proofreader who hit the empty-Find error and then typed the word.

socks becomes gloves

Odd socks in the dryer. Find socks, replace with gloves, literal, case sensitive.

Odd gloves in the dryer. One replacement. The period stays. An empty Find box would have stopped with an error instead.

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

The page stops and says to enter text or a pattern. “Odd socks in the dryer.” is not modified.