Regex tester

Pattern in, live matches out — with capture groups and every JavaScript flag. Nothing leaves the page.

/ /

How it works

The pattern compiles as a JavaScript RegExp with your flags — including the g flag for all matches and capture groups listed per match. Invalid patterns show the engine's own error message instead of guessing. Since it's the browser's native engine, what you see is exactly what your code will do.

Frequently asked questions

Which regex flavor is this?

JavaScript (ECMAScript) — lookbehind, named groups and unicode properties are supported in modern browsers. PCRE-only features like \K won't work.

Why does my match loop forever / hang?

Catastrophic backtracking — nested quantifiers like (a+)+$ on adversarial input. Simplify the pattern; no tool can fix a pattern that runs exponentially.

Written and maintained by Steven Huang · Last reviewed October 29, 2026.