In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Parse Address

lbolin
8 - Asteroid

I am trying to parse out addresses and i am able to parse the addresses when it hits a digit but some addresses are PO Box's and i am having trouble parsing PO Box Address out. 

 

Example:

Jeff Adams Po Box 123Jeff AdamsPo Box 123
Betty Jean 508 South River BendBetty Jean508 South River Bend
6 REPLIES 6
AngelosPachis
16 - Nebula

Hi @lbolin ,

 

One way to do that is by using RegEx 

 

AngelosPachis_0-1608060715374.png

 

So in that regular expression, you keep everything before a digit or Po Box appears, and then whatever comes after that digit or Po Box in a separate column. Hope that helps.

 

Regards,

 

Angelos

lbolin
8 - Asteroid

Thank you very much this took me in the right direction. I ended up using (.*?) ([\d+\s.|Po].*) for it to parse correctly I am now having a problem if a word starts with a p or an o it parses it as well.

 

Example:

AddressAddress ExtrasParsed Address
98 Oak Street98Oak Street
1252 Wild wood place1252 Wild Wood place
Tom Onel 3805 N Michigan AveTomOnel 3805 N Michigan ave
   

 

Correct Answer:

Addressaddress Extrasparse Address
98 Oak Street 98 Oak Street
1252 Wild Wood Place 1252 Wild Wood Place
Tom Onel 3805 N Michigan AveTom Onel3805 N Michigan Ave
AngelosPachis
16 - Nebula

Hi @lbolin ,

 

You can make it case sensitive and the use a formula tool to feed the address to the second field.

 

AngelosPachis_0-1608067833221.png

 

Would that work for your whole dataset?

 

AngelosPachis_1-1608067862131.png

 

Cheers, 

 

Angelos

lbolin
8 - Asteroid

could you share your workflow?

grazitti_sapna
17 - Castor

Hi @lbolin , here is the workflow similar to what @AngelosPachis  did.

 

grazitti_sapna_0-1608188238499.png

 

Thanks.

Sapna Gupta
lbolin
8 - Asteroid

Thank you so much. I do have one more question, how might i alter the regex to take into consideration if the address line starts with Po Box. 

This is what it is currently doing:

 

Po Box 23456Po Box23456
Labels
Top Solution Authors