Category: Developer tools

Regex Tester

Test JavaScript regular expressions with live matches and groups

Build a JavaScript regular expression and see matches, capture groups and a replacement preview update as you type. Runs entirely in your browser.

Flags /g
3 matches
  1. ada@example.comat 0
    $1 ada$2 example.com
  2. grace@example.orgat 25
    $1 grace$2 example.org
  3. support@localtools.devat 50
    $1 support$2 localtools.dev
Replace preview
ada [at] example.com wrote to grace [at] example.org and to support [at] localtools.dev

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

This tester uses the JavaScript RegExp engine built into your browser, so what you see here is exactly what your front-end or Node.js code will do. Toggle the standard flags, inspect every match with its position and capture groups — numbered and named — and preview a replacement using $1, $2 or $<name> references. Invalid patterns show the engine's own error message instead of failing silently.

How to use it

  1. Type your pattern without the surrounding slashes.
  2. Toggle the flags you need, such as g for all matches or i for case-insensitive.
  3. Paste your test string, read the match list, then check the replacement preview.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

Which regex flavour is this?
JavaScript RegExp. Patterns written for PCRE, Python or .NET may need small changes, for example around lookbehind support or named-group syntax.
How do I use capture groups in the replacement?
Use $1, $2 and so on for numbered groups, $<name> for named groups, and $& for the whole match.
Why do I only get one match?
Without the g flag a regular expression stops at the first match. Turn on g to list every match in the test string.