Build, test, and debug regular expressions
This regex matches Business Identifier Codes (BIC/SWIFT) as defined by ISO 9362. It validates the 8-character base code (bank, country, location) and optionally the 3-character branch code, allowing for 'XXX' as the headquarters branch. Useful for validating financial transaction inputs, parsing bank identifiers in documents, or data extraction from messages like SWIFT MT/MX.