Skip to content

Regex Tester

Test a regular expression against text and see live matches.

//g

Type a regular expression and a test string above to see every match highlighted in place, along with a table of match positions and capture groups. Toggle the flags — `g`, `i`, `m`, `s`, `u`, `y` — to change how the pattern behaves without rewriting it.

This uses the same JavaScript regular-expression engine your code runs, so what matches here matches in Node.js and the browser. Named groups and numbered groups are both shown, and everything runs locally — your pattern and text are never uploaded.

Frequently asked questions

Which regex flavor does this tester use?

It uses the JavaScript (ECMAScript) engine built into your browser, the same one Node.js uses. Patterns behave identically to `new RegExp()` in your code, including named groups, lookahead, and lookbehind. It is not PCRE or Python `re`, so a few syntaxes differ.

What do the g, i, and m flags do?

The `g` (global) flag finds all matches instead of stopping at the first; `i` makes matching case-insensitive; and `m` (multiline) makes `^` and `$` match the start and end of each line rather than the whole string. You can combine them freely.