🔍 Regex Tester

Live highlighting · match groups · common patterns — all in your browser

Advertisement

Test, debug and learn regular expressions without leaving the browser. Type a pattern and a test string: matches highlight instantly, named groups get colour-coded, and the common-patterns library gives you a starting point for email, URL, IPv4, dates and more. The JavaScript regex engine runs directly on your device — the same behaviour you get in Node, a browser console or input validation.

—

Match results

Common patterns

How JavaScript regex works

JavaScript uses ECMAScript regex syntax — close to PCRE, but with key differences. There are no possessive quantifiers (a++ is not valid), no atomic groups, and no multiline by default: ^ and $ match only the start and end of the whole string unless you add the m flag. The u flag enables Unicode mode (surrogate-pair-aware dot, property escapes like \p{L}), and the d flag (ES2022) adds match indices.

Backtracking caution: patterns that nest quantifiers (like (a+)+b) can blow up exponentially against adversarial input — the infamous ReDoS. Keep your patterns simple and avoid ambiguous nested quantifiers for anything running server-side.

Part of Everyday Tools. For string manipulation try the Text Toolkit.

Advertisement
Advertisement