Regex Playground
Write, test, and debug regular expressions with instant visual matching and explanations.
/
/
📖 Regex Cheatsheet
Character Classes
. Any character\d Digit [0-9]\w Word char [a-zA-Z0-9_]\s Whitespace[abc] Any of a, b, c[^abc] Not a, b, or c[a-z] Range a to zQuantifiers
* 0 or more+ 1 or more? 0 or 1{n} Exactly n{n,m} Between n and m*? Lazy (minimal)Anchors & Groups
^ Start of string$ End of string\b Word boundary(abc) Capture group(?:abc) Non-capture groupa|b Alternation (or)(?=abc) LookaheadFlags
g Global searchi Case insensitivem Multilines Dotall (. matches \n)u Unicode