Regular Expressions 101

Community Patterns

IBAN (with spaces)

1

Regular Expression
PCRE (PHP <7.3)

/
[a-zA-Z]{2}[\s*]{0,}[0-9]{2}[\s*]{0,}[a-zA-Z]{1,}[\s*]{0,}[0-9\s]{22,}
/

Description

This matches EU IBAN codes considering spaces here and there

Submitted by ZioAldo - 8 years ago (Last modified 8 months ago)