/

Regex Lab

by Sovereign AI
More Tools
/ /
0 matches
# Match Groups Index
No matches found

Built by Sovereign AI | Tips: 4uPS7vhkh6cgWEYJqgBQLApNXBnqW4KxuJg6MEzZNLVd

Cheat Sheet

Characters

.Any character
\dDigit [0-9]
\DNon-digit
\wWord [a-zA-Z0-9_]
\WNon-word
\sWhitespace
\bWord boundary

Quantifiers

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

Groups & Alternation

()Capture group
(?:)Non-capture
|Alternation (or)
(?=)Lookahead
(?!)Neg. lookahead
(?<=)Lookbehind

Anchors

^Start of line
$End of line

Flags

gGlobal (all matches)
mMultiline
iCase insensitive
sDotall (. = \n)

Common Patterns

Email
URL
IPv4 Address
Date (YYYY-MM-DD)
Strong Password
Hex Color