We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Need Help in Parsing Address

jatienza
8 - Asteroid

Hi,

 

Need help in parsing addresses. Please see below raw data and output.

 

Raw Data

address
680, glue Girl, 19th Floor; Montreal, Quebec H4H 1T2 , CA
64 Middle Rd; Hudson, Quebec L0K, CA
43 Countryside Gun; Pointe-Claire, Québec D7X, CA
Ottawa, CA
10 Queen Avenue West, UP M7B 3N7; Suite 2003; Toronto, Ontario 3N7, CA
27 Glue Bourbeau; Québec, CA

 

Output:

address 1address 2citystatepostal codecountry
680, glue Girl, 19th Floor MontrealQuebecH4H 1T2CA
64 Middle Rd HudsonQuebecL0KCA
43 Countryside Gun Pointe-ClaireQuébecD7XCA
   Ottawa CA
10 Queen Avenue West, UP M7B 3N7Suite 2003TorontoOntario3N7CA
27 Glue Bourbeau  Québec CA
4 REPLIES 4
jatienza
8 - Asteroid

I have used and modified this regex for US addresses from @BS_THE_ANALYST - ^(?:(.*?);)?\s*(?:(.*?);)?\s*(.*?),\s*([^\d]+)(\d{5}(-\d{4})?)?,\s*(.*)

gaoa
11 - Bolide

Hi @jatienza 

Thanks for sharing! Is the output what you expected? Or do you need further help?

jatienza
8 - Asteroid

Hi @gaoa 

I still need further help if anyone can modify this regex ^(?:(.*?);)?\s*(?:(.*?);)?\s*(.*?),\s*([^\d]+)(\d{5}(-\d{4})?)?,\s*(.*) to accommodate the raw data for Canada I have posted above.

Raj
16 - Nebula

I guess this is not giving the required solution.

Labels
Top Solution Authors