Test, validate and match regular expressions
Validates a Legal Entity Identifier (LEI) per ISO 17442: exactly 20 characters — the first 18 must be uppercase letters or digits, followed by a 2-digit numeric check value. Anchored with ^ and $ under the multiline flag, each line is validated independently, while the global flag finds all matches in a block of text. Commonly used in financial compliance workflows like KYC, MiFID II, or Dodd-Frank reporting to verify entity identifiers.