AZ Tools

Find & Replace

Text

A simple search-and-replace that supports both literal and regex modes. In literal mode, the find string is escaped so special regex characters work as themselves. In regex mode, the full JavaScript regex flavor is available — including capture groups (`$1`, `$2`), backreferences, and Unicode (`\u` flag always on). Case-insensitive by default; toggle on case sensitivity when you need it. Multiline and dotAll flags only show in regex mode where they matter.

Output
Paste text on the left.

Uses JavaScript regex syntax. In regex mode, replacement supports $1, $2, … for groups and $& for the full match.

How to use

  1. Paste your text on the left.
  2. Enter the find pattern (and replacement, if you want one).
  3. Toggle regex mode for advanced patterns. The match count updates live so you can sanity-check before copying.

Frequently asked questions

How do I keep the match but wrap it in tags?
Turn on regex mode. In the replacement field use `$&` for the entire match, or `$1`, `$2` for capture groups. Example: find `\b\w+\b`, replace `<em>$&</em>` to wrap every word.
Why doesn't `^` match my line starts?
By default `^` matches only the very start of the string. Turn on multiline (`m` flag) and `^` / `$` will match line starts and ends.
Why does `.` not match my newlines?
By default `.` skips newlines. Turn on dotAll (`s` flag) for true 'any character' behavior.
What if my replacement contains literal `$`?
JavaScript's regex replace treats `$` as a special character. Use `$$` to insert a single literal `$`. The find side has no such issue — literal strings are escaped before becoming a regex.

Related tools