Opening page…
Pattern matching — anchors, classes, quantifiers, groups.
.Any char except newline\d \DDigit / non-digit\w \WWord char / non-word\s \SWhitespace / non-ws[abc]a, b, or c[^abc]Not a, b, or c[a-z]Range^Start of line$End of line\bWord boundary\BNon-boundary*0 or more+1 or more?0 or 1{3}Exactly 3{2,5}Between 2 and 5{2,}2 or more*?Lazy (non-greedy)(abc)Capture group(?:abc)Non-capturing(?<name>x)Named groupa|bAlternation(?=x)Positive lookahead(?!x)Negative lookahead(?<=x)Positive lookbehind# email (simple)
^[\w.+-]+@[\w-]+\.[\w.-]+$
# URL
https?://[^\s]+
# IPv4
\b(\d{1,3}\.){3}\d{1,3}\b
# strip HTML tags
<[^>]+>