Find and Replace in Text

Replace or remove every occurrence of a word, character or pattern in pasted text — case-sensitive and regex options included.

1,111 views

How Find and Replace Works

Plain text search only matches the exact sequence of characters you type — searching "cat" finds "cat" but nothing else. Regex mode turns the search field from a literal string into a pattern description: instead of matching one exact sequence, it matches whole classes of text. \d+ means "one or more digits," \s+ means "one or more whitespace characters," and [^\w\s] means "any punctuation or symbol." This lets you replace every phone number, every extra space, or every currency symbol in a document in one pass instead of running dozens of separate literal replacements.

Concrete example: cleaning a list of exported emails where every address is followed by a stray semicolon and a variable number of spaces. A literal find-and-replace would need one rule per unique case, but a regex like ;\s* (a semicolon followed by zero or more spaces) removes every instance in a single operation, regardless of exactly how many spaces follow each one.

What to Know

  • Case sensitivity matters: searching "Ankara" with case-sensitive matching on will not find "ankara" or "ANKARA" — turn the option off for a case-insensitive sweep across the whole text.
  • Regex has special characters: symbols like . * + ? ( ) [ ] { } carry special meaning inside a pattern; to match them literally, escape them with a backslash (for example, \. to match a literal period rather than "any character").
  • Leaving replacement empty deletes: a replacement value isn't required — leaving the field blank simply removes every match, which is the fastest way to strip unwanted characters entirely.
  • The result updates live: so you can confirm your pattern matches exactly what you intended before copying the output, without a separate "preview" step.
  • Order of operations is one pass: the tool applies a single find/replace rule at a time. For a multi-step cleanup (say, removing extra spaces and then fixing quote marks), run the tool once per rule, feeding the output of one pass into the next.

Both plain and regex modes exist side by side because they solve different problems: plain text search is predictable and safe for a fixed phrase — a company name, a specific typo, a repeated legal disclaimer — while regex trades a little predictability for enormous flexibility when the thing you are removing isn't a fixed string but a shape, like "any sequence of digits" or "anything inside parentheses." Knowing which mode fits your task saves you from writing a fragile pattern when a literal match would have done the job just as well.

Frequently Asked Questions

How do I remove a character instead of replacing it?

Leave the "replace with" field empty — every match of the "find" field is deleted, which is the fastest way to strip a repeated symbol, watermark phrase or stray character from an entire text in one action.

What does regex mode add?

It treats the "find" field as a JavaScript regular expression, so you can match patterns like \d+ (any digits) or [^\w\s] (punctuation) instead of a fixed string. This lets one rule cover every matching case in the text instead of writing a separate literal replacement for each variation.

Is my text uploaded?

No — replacement happens locally as you type using JavaScript in your browser; nothing leaves your device, and the text disappears the moment you close the page.

Why doesn't searching "Ankara" find "ankara"?

Case-sensitive matching treats uppercase and lowercase letters as different characters by default, so "Ankara" and "ankara" are considered two different strings. Turn off case sensitivity if you want the search to ignore letter case entirely and catch every variation regardless of capitalization.

How do I search for a literal period, parenthesis or other special character?

In regex mode, characters like . * + ? ( ) [ ] { } have special meaning — a period, for instance, normally means "any character," not a literal dot. Put a backslash before the character to match it literally: \. matches an actual period, and \( matches an actual opening parenthesis.

Comments

No comments yet — be the first to write one!

Similar Tools