Regex flags reference
g— global; find all matches, not just the firsti— case-insensitivem— multiline;^and$match line boundariess— dotall;.also matches newlines
Common patterns
- Email:
\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b - URL:
https?:\/\/[\w.-]+\.[a-z]{2,}\/?\S* - IPv4:
\b(?:\d{1,3}\.){3}\d{1,3}\b - Date YYYY-MM-DD:
\b\d{4}-\d{2}-\d{2}\b
FAQ
Which regex flavour is this?
JavaScript / ECMAScript. It's close to PCRE but missing a few features (no atomic groups, no possessive quantifiers, no lookbehind support before ES2018).
Is my text sent anywhere?
No. The regex runs entirely in your browser.