Cheatsheet Pages / Regex Cheatsheet
How to name a capture group — (?<name>...)
Group $7 tells you nothing; a group named year explains itself.
Patterns use the syntax shared by PCRE / Python / JavaScript; engine differences are flagged in the cheatsheet where they matter. Test any pattern at regex101.com — and pick the matching engine.
(?<year>\d{4})-(?<month>\d{2})
# year="2026", month="10"
Good to know
Python also accepts (?P<name>...); JavaScript needs ES2018+.
