⇄
Runs in your browserNothing is uploadedText

Find and Replace

Find and replace text with plain matching or regular expressions, whole words or exact case, and see how many replacements were made.

Loading tool…
Short answer

Find and Replace swaps every match of a word or phrase in your text and tells you how many replacements it made. Match whole words only or exact case, or switch on regular expressions to rearrange text with capture groups. It runs in your browser.

What is a regular expression?

Regular expression

A regular expression, or regex, is a pattern that describes text rather than spelling it out. For example \d+ means one or more digits. Parts in brackets can be put back in the replacement as $1, $2 and so on, which lets you reorder dates or names.

Why use Find and Replace?

  • Change every occurrence at once. Rename a product, fix a repeated typo or swap British for American spelling across a whole document.
  • Know exactly what changed. The count of replacements shows whether your search hit what you expected before you copy the result.
  • Safe with special characters. In plain mode, characters such as $, . and ( are matched literally, so prices and code are not misread as patterns.

How to use Find and Replace, step by step

Find and Replace in PrintxPDF with a file loaded, options on the right and the run button below
Find and Replace with a file loaded: the steps below follow this screen.
  1. Paste your text into Find and Replace. Then type what to find and what to put in its place on the right.
  2. Set the matching rules. Choose exact case, whole words only, or regular expressions.
  3. Check the count and copy. The number of replacements appears above the result, which updates as you type.

Frequently asked questions

How do I delete every match?

Leave the "Replace with" box empty. Every match is removed.

Can I insert a line break?

Yes, with regular expressions switched on: type \n in the replacement for a new line, or \t for a tab.

What happens if my pattern is invalid?

You get a plain message saying the regular expression is not valid, and your text is left alone.

Looking for the long version? The guides cover each of these jobs in depth.