Regex tester
Type a pattern and some text — matches highlight live, with capture groups listed below.
How this tester works
Your pattern runs against the text using JavaScript's own regular expression engine — the same one your code will actually use if this is for a script or webpage. Matches are highlighted in the text and listed with their capture groups below.
Which flags are supported?
g (global — find all matches, not just the first), i (case-insensitive) and m (multiline, so ^ and $ match line boundaries) — the ones you'll use in practice.
Why does my pattern show an error?
JavaScript's regex syntax has a few differences from other languages (PCRE, Python) — an unescaped special character or an unsupported construct will throw a syntax error, shown directly instead of a silent wrong result.
Is my text sent anywhere?
No — matching runs entirely in your browser with plain JavaScript. Nothing is uploaded.
