18Real-world patterns
Put it all together: e-mail addresses and valid dates.
Real patterns combine everything: anchors to check the whole value, classes for allowed characters, quantifiers for length and groups for structure. Aim for good enough – a pattern that accepts every real e-mail address and rejects obvious typos is better than a 6,000-character monster.
Validate a date's shape and ranges with alternation: months (0[1-9]|1[0-2]), days (0[1-9]|[12]\d|3[01]). Leap years are a job for code, not regex.
The Library has dozens of tested patterns you can open in the tester and adapt.
Exercises
Lesson complete – well done!