Start Free Trial

Alteryx Designer Desktop Discussions

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

How to parse out the address

yuanli1
5 - Atom

Hello,

 

I am a beginner in Alteryx. Can anyone please help how to parse out these addresses? 

 

The format of the solution is like: Address, City, State, Zip Code and Country, and they are in five different columns. Thank you! 

2 REPLIES 2
gautiergodard
13 - Pulsar

@yuanli1 Here is one way that will get you close, there are some inconsistencies in the way your addresses are entered which caused the regex to be imperfect

gautiergodard_0-1667351564225.png

Hope this helps!

 

flying008
15 - Aurora

Hi, @yuanli1 

 

Maybe you can try this way:

1- Formula for [Address] to fix layout :

 

Trim(IIF(REGEX_Match([Address],"^[[:alnum:]\s]+?\n(\d+?[[:alpha:]]+?|[[:alpha:]]+?\d+?)\n.+?$"),ReplaceFirst([Address], "
", " "),[Address]))

 

 

2- Split by newLine "\n"

3- Parse by RegEx expression:

 

^([[:alpha:]\s]+?),\s([a-zA-Z\s]+?)\s(.+?)$

 

 

4- Select you want output fields and rename.

 

录制_2022_11_02_10_41_14_395.gif

 

******

If it can help you , please mark it as a solution and give a like to here. 

Labels
Top Solution Authors