Test, validate and match regular expressions
Parses the second line of a passport Machine Readable Zone (ICAO Doc 9303 TD3 format) using named capture groups: passport number (9 alphanumeric), nationality (3 letters), date of birth (YYMMDD), sex (M, F, or <), expiration date, and a 16-char personal number/optional field. Check digits are consumed but not captured. Ideal for OCR post-processing, KYC workflows, and identity document validation.