Free Trial

Alteryx Designer Desktop Discussions

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

Regex to Parse Data

tahertalib
7 - Meteor

Hi

I have data in the below format and want to split the data from right to left to get the below desired output:

 

Input Data

Bass Pro Mills Dr, Vaughan, ON L4K 5W4, Canada

Bowling Club, 12345 10 St NW, Edmonton, AB T6B 2W9, Canada

1055 S 43rd St, Grand Forks, ND 58201, USA

 

Output Data

 

CountryPostal CodeProvinceCityStreet AddressOther Data
CanadaL4K 5W4ONVaughanBass Pro Mills Dr 
USA58201NDGrand Forks1055 S 43rd St 
CanadaT6B 2W9ABEdmonton12345 10 St NW Bowling Club

Could someone please let me know how can this be achieved through Regex? In my dataset i have a mix or Canada and US addresses.

 

Thanks

1 REPLY 1
Qiu
21 - Polaris
21 - Polaris

@tahertalib 
RegEx will really depends the pattern of your data.

I have to assume, the fields are seperated by comma, and the Province is a two letter field.

1019-tahertalib.PNG

Labels
Top Solution Authors