Regex Tester

Test JavaScript regular expressions live: see every match highlighted in your text, with positions and capture groups, plus full flag support. Your pattern stays in your browser.

/ /

Flags: g global · i ignore case · m multiline · s dotall · u unicode

-

How it works

This uses your browser's own JavaScript regular-expression engine. Matches are highlighted in the test string, and each match is listed with its position and any capture groups, the parts wrapped in parentheses. Add the g flag to find every match rather than just the first.

Your pattern and text never leave your browser.

What this does

A regex tester runs a JavaScript regular expression against your text live, highlighting every match with its position and capture groups.

How to use it

  1. Enter a pattern and flags.
  2. Paste your test text.
  3. See matches highlighted.
  4. Inspect the capture groups.

How it works

It uses your browser’s built-in JavaScript engine, so the syntax and flags (g, i, m, s, u, y) match real JavaScript. Capture groups are the parts of a match wrapped in parentheses.

Example

The pattern [0-9]+ highlights every run of digits in your text.

Sources & methodology

Last updated .

Frequently asked questions

Which regex flavour does it use?

It uses your browser’s built-in JavaScript engine, so the syntax and flags (g, i, m, s, u, y) match what runs in real JavaScript.

What are capture groups?

They are the parts of a match wrapped in parentheses. Each match lists its groups so you can see exactly what was captured.

Is my pattern or text uploaded?

No. Matching happens locally in your browser; nothing is sent or stored.