Regex Tester

Type a pattern and test text — matches highlight live, with a list of matches and capture groups.

Sponsored
📖 Regex cheatsheet
. any char   \d digit   \w word   \s space
\D \W \S negated versions
^ start   $ end   \b word boundary
* 0+   + 1+   ? 0/1   {2,5} range
*? lazy   [abc] set   [^abc] negated
(x) group   (?:x) non-capturing
(?<name>x) named group   \1 backref
x(?=y) lookahead   x(?!y) negative
(?<=y)x lookbehind   a|b alternation
Flags: g all   i case   m multiline   s dotall   u unicode
Sponsored
/* single ad unit — insert AdSense/Ezoic code here */

How it works