I have the following regex expression:
(?<=[^:]:)?([a-zA-Z]{6}\w[a-zA-Z]{4})
Which is looking for every instance of SWIFT BIC code.
The SWIFT code consists of 8 or 11 characters. When 8-digits code is given, it refers to the primary office.
- First 4 characters - bank code (only letters)
- Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
- Next 2 characters - location code (letters and digits) (passive participant will have "1" in the second character)
- Last 3 characters - branch code, optional ('XXX' for primary office) (letters and digits)
So given the list items above and my regex expression, i'm trying to lift out of this exmaple string all the BICS. The screen shot shows, what i'm watching, correctly and wrongly.
You can see at the top, that i'm not there. I need to only pull back these:
- BARCGB2LXXX
- BARCGB2LXXX
- HSBCGB2LXXX
- HSBCGB2LXXX
- RBOSGB2RTCM
- SABCIR2HXXX
EDIT
Perhaps may be best to quantify that this regex is intended to be used within .NET application