Parsing Swift Codes using Regex
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi everyone,
Need some help here which I can't seem to find anywhere in prior videos or discussions.
I'm trying to parse out swift codes from a column of free-running text, and I don't understand why this wouldn't work when I type it into the field under Regular Expression:
/[A-Z]{6}[\w]{5}/
Swift codes as you know, are pretty standard - they comprise of a 4-letter bank code, a 2-letter country code, a 2-letter or number location code followed by a 3-letter or number branch code.
Any help will be greatly appreciated!
Thanks!
Solved! Go to Solution.
- Labels:
- Topic of Interest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Regex Tool | Parse mode
(\l{6}\d{5})
Config:
Output:
Hope this helps 🙂 Feel to ask if you have any questions
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
A swift code can be 8 or 11 characters long (sometimes X padded). I would use the Regex Tool > Parse with the expression,
(\u{6}\w{2}(?:\w{3})?)
Thx,
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for showing me how to set up the regex tool!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks! This works!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
As Phil pointed out it can be 8 or 11 characters, typically 11. The last 3 represent the brach identifier or 'XXX' ro signify head office.
