Developer Tools
Regex Cheat Sheet 2026 - Complete Regular Expression Reference
The ultimate regex cheat sheet with examples. Learn regular expression syntax for JavaScript, Python, Go, and more.
August 5, 20265 min read
Regex Basics
| Pattern | Meaning | Example |
|---|---|---|
| . | Any character (except newline) | a.c matches "abc", "adc" |
| \d | Any digit (0-9) | \d{3} matches "123" |
| \w | Word character (a-z, A-Z, 0-9, _) | \w+ matches "hello_world" |
| \s | Whitespace | \s+ matches spaces/tabs |
| ^ | Start of string | ^Hello matches "Hello world" |
| $ | End of string | world$ matches "Hello world" |
Quantifiers
| Pattern | Meaning |
|---|---|
| * | 0 or more |
| + | 1 or more |
| ? | 0 or 1 |
| {n} | Exactly n times |
| {n,m} | Between n and m times |
Common Patterns
- Email: ^[\w.-]+@[\w.-]+\.\w{2,}$
- URL: https?://[\w.-]+(?:/[\w.-]*)*
- Phone: \+?\d{1,3}[-.\s]?\d{3,4}[-.\s]?\d{4}
Test Your Regex
Use our Regex Tester to test patterns with live match highlighting and capture group display.