⬡ Developer · Regex

Regex Tester

Write a regular expression, flip the flags you need, and see every match highlighted in your test text in real time. Capture groups are broken out match by match, and any syntax error is reported the moment you type it.

Pattern

/ /
0
Matches
0
Capture groups
Active flags

Highlighted result


            

About this regex tester

A live playground for JavaScript regular expressions. Type a pattern, switch on the flags you need, and watch every match light up inside your own test text. For each match it lists the full match plus any capture groups, so you can confirm a pattern grabs exactly what you intend before dropping it into code. It uses the browser's native RegExp engine, so behaviour is identical to JavaScript in production.

How to use it

Is my text private?

Yes. The pattern and test text are evaluated by your browser's own regex engine in plain JavaScript. Nothing is uploaded or stored — it all stays on your device.

Which regex syntax does this use?

JavaScript's RegExp flavour (ECMAScript). Most patterns are portable, but features like lookbehind, named groups, and Unicode property escapes follow JavaScript's rules, which can differ slightly from PCRE, Python, or Go.

Why do I need the global flag to see all matches?

Without g, a regex stops at the first match — so only one is highlighted. Turn on g to scan the entire string and highlight every occurrence.

Can a pattern hang the page?

The tester guards against zero-length matches that would otherwise loop forever, and it caps the displayed list at 200 matches. Extremely catastrophic backtracking on a huge string is still up to the engine, so test pathological patterns on shorter text first.