Click any pattern to copy. Use Try in playground to test live.
Playground
gFind all matches (not just the first)iCase-insensitive — A matches am^ and $ match start/end of each linesDot (.) matches newline characters too^[^\s@]+@[^\s@]+\.[^\s@]+$copyMatches a basic email address.
user@example.comname+tag@domain.conot-an-email@nodomain.comhttps?:\/\/(www\.)?[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:/~+#]*[\w\-@?^=%&/~+#])?copyMatches http and https URLs.
https://example.comhttp://sub.domain.co/path?q=1#hashftp://nope.comexample.com^\+?1?[\s.\-]?\(?\d{3}\)?[\s.\-]?\d{3}[\s.\-]?\d{4}$copyMatches common US phone formats.
(555) 867-5309555.867.5309+1 555 867 5309867-5309^\d{5}(-\d{4})?$copyMatches 5-digit and ZIP+4 formats.
2280122801-1234228022801-123^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$copyValidates a properly formatted IPv4 address.
192.168.1.1255.255.255.0256.0.0.1192.168.1^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$copyMatches a valid UUID v1–v5.
550e8400-e29b-41d4-a716-446655440000not-a-uuid^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$copy8+ chars requiring upper, lower, digit, and special char.
Secret@123weakpasswordNoSpecial1^-?\d+$copyPositive or negative whole number.
42-1003.141e10^-?\d+(\.\d+)?$copyInteger or decimal, positive or negative.
3.14-0.5.51.^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$copy3- or 6-digit hex color codes.
#ff5733#FFFff5733#gg0000^\$?\d{1,3}(,\d{3})*(\.\d{2})?$copyUSD with optional $ and comma separators.
$1,234.56999.99$1234.5^\d{4}-\d{2}-\d{2}$copyYYYY-MM-DD format.
2026-06-0406/04/20262026-6-4^(0?[1-9]|1[0-2])[\/\-](0?[1-9]|[12]\d|3[01])[\/\-](\d{2}|\d{4})$copyM/D/YY or MM/DD/YYYY with / or - separators.
06/04/20266-4-262026-06-04^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$copyHH:MM and HH:MM:SS in 24-hour format.
14:3009:05:0025:009:5^(0?[1-9]|1[0-2]):[0-5]\d(:[0-5]\d)?\s?(AM|PM)$copyH:MM AM/PM format.
2:30 PM11:59:59 am14:00 PM^[a-z0-9]+(?:-[a-z0-9]+)*$copyLowercase slug like blog-post-title.
my-blog-posthello-world-123Not A Slug-leading-dash#[a-zA-Z]\w*copyFinds #hashtags in text.
#hello #world## not-a-tag@[a-zA-Z0-9_]+copyFinds @username mentions.
Hey @alice and @bob_99!no mentions here^[a-z][a-zA-Z0-9]*$copyStarts lowercase, no spaces or special chars.
myVariableNameMyClasshas space\b(\w+)\s+\1\bcopyFinds repeated adjacent words like "the the".
the the quick foxno duplicates here^\s*$copyMatches empty lines or lines with only spaces.
text<[^>]+>copyMatches any HTML tag — use .replace() to strip markup.
<p>Hello <b>world</b></p>plain text<!--[\s\S]*?-->copyMatches <!-- ... --> HTML comments.
<!-- a comment -->// not html\/\/[^\n]*copyMatches single-line // comments.
const x = 1; // init/* block comment */#[0-9A-Fa-f]{3,6}copyFinds hex colors within a larger string.
color: #ff5733; border: 1px #FFFno color here