Alteryx Designer Desktop Discussions

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

Regex Parse

CalDowd98
8 - Asteroid

Hi Community,

 

Im looking at some address data, and im looking to get the flat/apartment number from the string.

 

I've created a sample below of the type of address data i will get . Below is also the regex formula i have used to get the 2 columns address and term used.

I dont have anything returned for the last 2 lines, can anyone spot any issues in the formula that would result in this ?

 

thanks !

 

((?<= )APT|FLAT|APARTMENT|Suite)? ?((?<= )\d*)?$

 

CalDowd98_1-1572444833136.png

 

 

2 REPLIES 2
JoeS
Alteryx
Alteryx

Hi @CalDowd98 

 

I think you can go with:

 

 

.*(APT|FLAT|APARTMENT|Suite)+ (\d*)?

 

 

So you don't need the look behind parts 

 

Regex.png

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @CalDowd98

 

You could use (APT|FLAT|APARTMENT|Suite)\s+(\d+) as your regex expression.

 

 

image.png  image.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

Labels