Last active
May 9, 2017 14:05
-
-
Save susannej/a5af62395eb09650ea4de9058c8c0d19 to your computer and use it in GitHub Desktop.
BIC (Business Identifier Code / Bank Identifier Code) regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// really, really, really simple - only regex based - bic check | |
// /(?i).../ is the java equivalent to /.../i | |
boolean bicCheck(String bic) { | |
bic ==~ /(?i)[a-z]{6}[a-z2-9][a-np-z0-9]([a-wyz0-9][a-z0-9]{2})?(x{3})?/ ? true : false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment