What is proper RegEx expession for SWIFT codes?

Posted by abatishchev on Stack Overflow See other posts from Stack Overflow or by abatishchev
Published on 2010-06-12T09:27:48Z Indexed on 2010/06/12 9:32 UTC
Read the original article Hit count: 322

Filed under:
|
|
|

I have to filter user input to on my web ASP.NET page:

<asp:TextBox runat="server" ID="recipientBankIDTextBox" MaxLength="11" />
<asp:RegularExpressionValidator runat="server" ValidationExpression="?" ControlToValidate="recipientBankIDTextBox" ErrorMessage="*" />

As far is I know SWIFT code must contain 5 or 6 letters and other symbols up to total length 11 are alphanumeric.

How to implement such rule properly? TIO

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about regex