Regex Explainer

Paste a regular expression and get a plain-English breakdown of every component.

Enter Regular Expression
/ /
Try:
Explanation

Enter a regular expression above to see a plain-English breakdown.

Quick Reference

Anchors

^Start of string/line
$End of string/line
\bWord boundary
\BNon-word boundary

Character Classes

\dDigit [0-9]
\wWord char [a-zA-Z0-9_]
\sWhitespace
[abc]Character set
[^abc]Negated set

Quantifiers

*0 or more
+1 or more
?0 or 1 (optional)
{n}Exactly n times
{n,m}Between n and m

Groups

(abc)Capture group
(?:abc)Non-capturing group
(?=abc)Lookahead
(?!abc)Negative lookahead
a|bAlternation (a or b)