I need to check an input field for a German IBAN. The user should be allowed to leave in white spaces and input should be validated to have a starting DE
DE
Original:
^[DE]{2}([0-9a-zA-Z]{20})$
Debuggex Demo
Modified:
^DE(?:\s*[0-9a-zA-Z]\s*){20}$