Regex Tester

Test regular expressions live: every match position, captured groups and a replacement preview, with support for the g, i and m flags.

Runs in your browser: input and output are never sent to the server, and the platform does not store your input.

Input

Not stored

Common: g global, i ignore case, m multiline.

Output

Fill in the fields on the left, then run.

How to use

  1. 1Enter your pattern and flags.
  2. 2Paste the text to test against.
  3. 3Add a replacement string to preview the result.

FAQ

Which flavour of regex is this?

JavaScript's RegExp engine, so the syntax matches Node.js and the browser.

Can the replacement use groups?

Yes — use $1, $2 for captured groups, or $<name> for named groups.

Why are there no matches?

Check whether you need the g flag, and whether special characters are escaped correctly.