Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Parsing Swift Codes using Regex

leahpenelope
7 - Meteor

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!

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @leahpenelope 

 

Try

\l{6}\d{5}

atcodedog05
22 - Nova
22 - Nova

Hi @leahpenelope 

 

Regex Tool | Parse mode

(\l{6}\d{5})

Config:

atcodedog05_0-1606300812103.png

Output:

atcodedog05_1-1606300829025.png

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 😀👍

PhilipMannering
16 - Nebula
16 - Nebula

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 

leahpenelope
7 - Meteor

Thanks for showing me how to set up the regex tool!

leahpenelope
7 - Meteor

Thanks! This works!

Jason_B
5 - Atom

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.

Labels