SOLVED
Extract Zip Code from Address
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
tjamal1
8 - Asteroid
‎03-12-2020
07:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
Solved! Go to Solution.
Labels:
- Labels:
- Regex
4 REPLIES 4
15 - Aurora
‎03-12-2020
07:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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+)$
Aaron_Harter
11 - Bolide
‎03-12-2020
07:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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:
‎03-12-2020
08:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank for you reply,
Both Solutions worked for me
‎03-12-2020
08:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank for you reply,
Both Solutions worked for me . Seems like i am getting the code in last for now
