Test, validate and match regular expressions
Parses the 3-line MRZ (Machine Readable Zone) of a TD1-format identity card following ICAO Doc 9303. Line 1 captures document type, issuing country, document number with check digit, and optional data; line 2 captures birth date, sex, expiration date, nationality, and final composite check digit; line 3 captures surname(s), given name(s), and optional complement separated by double angle brackets. Commonly used for OCR post-processing and automated extraction of data from national ID cards.