Catalog / Regex Cheatsheet
Regex Cheatsheet
A detailed cheat sheet featuring numerous regex examples and explanations on how regex works. Explore literal matching, metacharacters, groups, lookahead/lookbehind, alternation, and practical patterns for emails, URLs, dates, and code extraction.
Basic Regex Patterns
Literal & Simple Patterns
|
|
|
|
|
|
Anchors & Boundaries
|
|
|
|
|
|
Character Classes
|
|
|
|
|
|
Quantifiers
|
|
|
|
|
|
Advanced Regex Techniques
Grouping & Capturing
|
|
|
|
|
|
Lookahead & Lookbehind
|
|
|
|
|
|
Alternation & Escaping
|
|
|
|
|
|
Practical Regex Examples
Email & URL Patterns
Email Pattern 1 |
|
Email Pattern 2 |
|
URL Pattern 1 |
|
URL Pattern 2 |
|
Simple URL |
|
Email with mailto |
|
Date & Time Formats
ISO Date |
|
US Date |
|
European Date |
|
24-Hour Time |
|
12-Hour Time |
|
Day of Week |
|
Code Snippets & Extraction
Python Comment |
|
HTML Tag |
|
JS Console Log |
|
Python Function |
|
Java Main Method |
|
TODO/FIXME Comment |
|
JS Variable Declaration |
|