Regex Tester

Live-highlight matches, debug regex.

A free regex tester that highlights matches live, counts them, shows capture groups and previews replacements. It ships with a library of common patterns (email, URL, IP and more) and runs entirely in your browser.

How to use

  1. Type a pattern in the Pattern box and toggle the g/i/m/s/u flags with the chips.
  2. Paste text into the Test string box to see matches highlight instantly.
  3. Use the built-in library to drop in common patterns like email, URL or IPv4.
  4. Turn on Replace and enter a replacement ($1,
    lt;name> supported) to preview the result.

FAQ

Which regex flavor does it use?
JavaScript (ECMAScript) regex — the same RegExp engine as in browsers and Node, with named capture groups and the g/i/m/s/u flags.
Is my test text uploaded?
No. Matching and replacing run locally in the browser; neither your text nor your pattern leaves your device.
How do I reference capture groups in replacements?
Use $1, $2 for numbered groups and
lt;name> for named groups, just like JavaScript’s String.replace.

Related tools