Alteryx Designer Desktop Discussions

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

Extract Zip Code from Address

tjamal1
8 - Asteroid

Hello

I have few addresses like this 

 

3685 Flinton Road (GD ), Flinton, ON K0H 1P0
509 Bayly St E, Ajax, ON L1Z 1W7
80 Richmond St Unit 8, Amherstburg, ON N9V 1E9

,

I want to extract Zip Codes from them 

 

Like for above records it should be like 

1 KOH 1PO

2 L1z 1W7

3 N9V 1E9

 

How can i do this in Alteryx?

4 REPLIES 4
OllieClarke
15 - Aurora
15 - Aurora

If the Zip code will always be the last two parts of the address, and will always be separated by a space then you can use the following regex

 

.* (\w+ \w+)$

OllieClarke_0-1584025062596.png

 

Aaron_Harter
11 - Bolide

@tjamal1 you can use RegEx to extract this info if it's in the middle of your text string, but if it's always the last 7 characters in the cell try the Right formula:

3.PNG

tjamal1
8 - Asteroid

Thank for you reply,

Both Solutions worked for me 

 

tjamal1
8 - Asteroid

Thank for you reply,

Both Solutions worked for me . Seems like i am getting the code in last for now 

 

Labels