Regex Cheatsheet & Live Tester
Developer UtilitiesComprehensive regular expression (RegEx) reference cheatsheet with common patterns and a live testing sandbox.
Live Regex Tester
Ready & Popular Regex Patterns
Email Address
Validates standard email formatting.
URL / Web Address
URLs starting with http/https protocols.
IPv4 Address
Valid IPv4 addresses between 0.0.0.0 and 255.255.255.255.
Hex Color Code
3 or 6 digit hex color codes like #FFF or #FFFFFF.
URL Slug Format
SEO-friendly slug with lowercase letters, digits, and hyphens.
Strong Password
Min 8 chars: 1 uppercase, 1 lowercase, 1 digit, and 1 special char.
| Token | Description | Example | Copy |
|---|---|---|---|
| . | Any single character except newline | a.c -> abc, a1c | |
| \d | Any digit [0-9] | \d+ -> 42, 1984 | |
| \D | Any non-digit character | \D+ -> hello | |
| \w | Word character (alphanumeric + underscore) | \w+ -> user_12 | |
| \W | Non-word character | \W -> @, #, ! | |
| \s | Whitespace character | \s+ -> " " | |
| \S | Non-whitespace character | \S+ -> word | |
| \t | Tab character | \t | |
| \n | Newline character | \n | |
| [abc] | Any character enclosed in brackets | [aeiou] -> sesli harfler | |
| [^abc] | Any character NOT enclosed in brackets | [^0-9] -> rakam harici | |
| [a-z] | Character range lowercase a to z | [a-z]+ -> kod | |
| [A-Z] | Character range uppercase A to Z | [A-Z]+ -> TURK | |
| [0-9] | Digit range 0 to 9 | [0-9]{4} -> 2026 | |
| * | 0 or more matches | a* -> "", "a", "aaa" | |
| + | 1 or more matches | a+ -> "a", "aaa" | |
| ? | 0 or 1 match (optional) | colou?r -> color, colour | |
| {n} | Exactly n matches | \d{4} -> 2026 | |
| {n,} | At least n matches | \d{3,} -> 100, 10000 | |
| {n,m} | Between n and m matches | \d{2,4} -> 99, 9999 | |
| *? / +? | Lazy / non-greedy match | <.*?> -> ilk kapanışa kadar | |
| ^ | Start of string or line | ^https -> https ile başlayan | |
| $ | End of string or line | \.json$ -> .json ile biten | |
| \b | Word boundary | \bcat\b -> "cat" ("catch" değil) | |
| \B | Non-word boundary | \Bcat -> "scatter" | |
| (abc) | Capturing group | (\d{2})-(\d{2}) -> $1, $2 | |
| (?:abc) | Non-capturing group | (?:https?|ftp):// | |
| a|b | Alternation (OR operator) | kırmızı|mavi | |
| (?=abc) | Positive lookahead | \d+(?=px) -> 100 (100px içindeki) | |
| (?!abc) | Negative lookahead | \d+(?!px) -> px olmayan sayılar | |
| (?<=abc) | Positive lookbehind | (?<=\$)\d+ -> $ sonrasındaki rakam | |
| (?<!abc) | Negative lookbehind | (?<!\$)\d+ -> $ olmayan rakam |
Love ToolsApp? Buy Us a Coffee
ToolsApp operates 100% client-side with zero subscriptions and zero data tracking. We believe essential digital tools should remain free and accessible to everyone. Your coffee donations help us keep servers running and build new tools!
How to Use Regex Cheatsheet & Live Tester
Search Rules
Filter regex tokens by category or search term.
Test Live
Use the live tester on top to test regex patterns against sample text.
Copy Pattern
Copy syntax rules or common patterns directly to your clipboard.
User Reviews & Feedback
Share your experience anonymously. Moderated automatically by AI.