Pattern Lab

Regex Tester

Live JavaScript regex playground with highlighted matches, capture groups, and instant feedback.

Live Matching

Patterns and inputs evaluate as you type. No "Run" button.

🎯

Capture Groups

Numbered and named capture groups appear inline with each match.

📚

Common Presets

Email, URL, IPv4, hex color, phone, and date patterns one click away.

Frequently Asked Questions

What flavor of regex is this?

JavaScript / ECMAScript regex — the same engine used in browsers, Node.js, and modern serverless runtimes.

Can I use lookbehind?

Yes — modern JavaScript supports both lookahead (?=…) (?!…) and lookbehind (?<=…) (?<!…) assertions.

How do I match newlines with .?

Enable the s (dotAll) flag. By default, . does not match newline characters.

How do I write a Unicode-aware pattern?

Enable the u flag. This activates full Unicode escapes like \p{Letter} and treats astral characters as single code points.

Part of the Tools Lab by Azeem Shafeeq