IBAN Regex design [duplicate]
This question already has an answer here: IBAN Validation check 5 answers Help me please to design Regex that will match all IBANs with all possible whitespaces. Because I've found that one, but it does not work with whitespaces. [a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16} I need at least that formats: DE89 3704 0044 0532 0130 00 AT61 1904 3002 3457 3201 FR14 2004 1010 0505 0001 3 Just for the example IBAN's from those countries : Start with 2 letters then 2 digits. Then allow a space before every 4 digits, optionally ending with 1 or 2 digits: \b[A-Z]{2}[0-9]{2}(?:[ ]?[0-9]