Build, test, and debug regular expressions
Parses the header record of a Brazilian bank return file (CNAB400 format), a 400-character fixed-width line. Named capture groups extract fields like record type, return/service codes, agency (agencia), account (conta), DAC check digit, company and bank names, generation/credit dates, density, and sequential record numbers. Anchored with ^ and used with the m flag to process each record line in retorno files, typical for automated banking/payment reconciliation systems.