Skip to content
Text

Find and replace text, with regex support

Change a repeated name, fix a phrase throughout a draft, or remove a matching pattern. The result appears beside a match count while your original stays available for another try.

Runs in your browser — your input is not uploaded to ToolsNow.

Input
0 chars0 words0 lines
Result
0 chars0 words0 lines

How to use

  1. Paste the text to edit. Start with a short sample if you are trying a regular expression.
  2. Fill in Find and Replace with. Leave Replace with empty to delete the matches. Ordinary searches treat punctuation literally.
  3. Choose the matching rules. Whole words only avoids changing "cat" inside "cats". Regular expression enables patterns and switches whole-word mode off.
  4. Read the result before copying. Check both the match count and the changed passages, then use Copy result. A matching count alone does not tell you that the right words changed.

Questions

Does it replace every match?

Yes, throughout the input. There is no replace-one button. Use a more specific search or work on a selected passage if you only want one occurrence changed.

Can I search for a full stop or insert a dollar sign?

With Regular expression off, both the search and replacement are literal: "." finds full stops and "$1" inserts those two characters. With it on, a dot is a pattern and $1 refers to a capture group.

How do I swap captured parts?

Turn on Regular expression and use parentheses to capture text. Find "(\w+), (\w+)" and replace with "$2 $1" to turn "Smith, John" into "John Smith". This example suits simple names; JavaScript’s \w does not cover all accented letters.

Why do word boundaries or line anchors miss my text?

Whole words only uses JavaScript’s \b boundaries, which are limited for accented and non-Latin words. Regex mode has no multiline flag here, so ^ and $ refer to the input’s start and end rather than each line. The options do not understand sentences or names.

Can a regular expression stall the page?

Yes. Matching runs on the page thread with no timeout, so avoid nested repetition such as (a+)+b on large inputs. Invalid syntax shows an error and leaves the original text in the result; a valid but slow pattern can still block the tab.

Published by ToolsNow. How tools and sources are checked · Report a problem

Related tools