Regex Cheatsheet
Searchable regular expression syntax reference with examples.
Loading tool...
Related Tools
About this tool
Searchable regular expression syntax reference with examples.
Searchable regular expression syntax reference with examples.
Searchable regular expression syntax reference with examples.
^Start of string or line$End of string or line\bWord boundary\BNot word boundary\dDigit [0-9]\DNon-digit\wWord char [a-zA-Z0-9_]\WNon-word char\sWhitespace\SNon-whitespace[abc]a, b, or c[^abc]Not a, b, or c[a-z]a through z[A-Z0-9]Uppercase or digit*0 or more+1 or more?0 or 1 (optional)*?Lazy 0 or more+?Lazy 1 or more??Lazy 0 or 1{3}Exactly 3{3,}3 or more{3,6}3 to 6(abc)Capture group(?:abc)Non-capture group(?=abc)Positive lookahead(?!abc)Negative lookahead(?<=abc)Positive lookbehind(?<!abc)Negative lookbehind(a|b)a or b.Any char except newline\nNewline\tTab\\Literal backslash(?i)Case insensitive (flag i)^[\w.-]+@[\w.-]+\.\w{2,}$Email^https?:\/\/[^\s]+$URL^\d{4}-\d{2}-\d{2}$ISO Date^\+?[1-9]\d{7,14}$Phone number^(?=.*[A-Z])(?=.*\d).{8,}$Strong password