Comprehensive regular expression reference. Browse anchors, character classes, quantifiers, groups, lookarounds, flags, and common patterns. Filter by category or search.
52 results
| Pattern | Description |
|---|---|
| ^ | Start of string (or line with m flag) |
| $ | End of string (or line with m flag) |
| \b | Word boundary |
| \B | Non-word boundary |
| \A | Start of string (no multiline) |
| \Z | End of string (no multiline) |
| . | Any character except newline |
| \d | Digit [0-9] |
| \D | Non-digit [^0-9] |
| \w | Word character [a-zA-Z0-9_] |
| \W | Non-word character |
| \s | Whitespace (space, tab, newline) |
| \S | Non-whitespace |
| [abc] | Character set — matches a, b, or c |
| [^abc] | Negated set — not a, b, or c |
| [a-z] | Range — any lowercase letter |
| [A-Z] | Range — any uppercase letter |
| [0-9] | Range — any digit |
| * | Zero or more (greedy) |
| + | One or more (greedy) |
| ? | Zero or one (optional) |
| {n} | Exactly n times |
| {n,} | n or more times |
| {n,m} | Between n and m times |
| *? | Zero or more (lazy/non-greedy) |
| +? | One or more (lazy) |
| ?? | Zero or one (lazy) |
| (abc) | Capturing group |
| (?:abc) | Non-capturing group |
| (?<name>abc) | Named capturing group |
| a|b | Alternation — matches a or b |
| (?=abc) | Positive lookahead |
| (?!abc) | Negative lookahead |
| (?<=abc) | Positive lookbehind |
| (?<!abc) | Negative lookbehind |
| \1 | Backreference to group 1 |
| i | Case insensitive match |
| g | Global — find all matches |
| m | Multiline — ^ and $ match line boundaries |
| s | Dotall — . matches newline too |
| u | Unicode — treat pattern as Unicode |
| y | Sticky — match only from lastIndex |
| ^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,}$ | Email address (simplified) |
| https?:\/\/[\w.-]+(?:\/\S*)? | URL (http or https) |
| ^\d{4}-\d{2}-\d{2}$ | Date in YYYY-MM-DD format |
| ^\+?[1-9]\d{1,14}$ | Phone number (E.164 format) |
| ^(?:\d{1,3}\.){3}\d{1,3}$ | IPv4 address (basic) |
| ^[0-9a-fA-F]{6}$ | Hex color (without #) |
| ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$ | Strong password (8+ chars, upper, lower, digit) |
| ^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$ | UUID v4 |
| ^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$ | Hex color with optional # |
| <([a-z][\w-]*)\b[^>]*>(.*?)<\/\1> | HTML tag with content (captures tag) |
marduc812
2026