Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

REGEX help or formula help

Brad1
11 - Bolide

I'm trying to write a formula or use the RegEx tool that will change:

 

123 Starry St

 

into

 

123 Starry Street  (and not 123 Streetarry Street)

 

I'd like to do some sort of Regex Replace.  I also need to account for "STE" to "Suite" and others.

3 REPLIES 3
afv2688
16 - Nebula
16 - Nebula

Hi @Brad1 ,

 

Use the find replace tool for that. Set it like in the example and it should work. You can keep adding terms to be searched on the list without problem.

 

Untitled2.pngUntitled.png

 

Cheers

Brad1
11 - Bolide

I was able to figure it out using RegEx.  Thx.

MarqueeCrew
20 - Arcturus
20 - Arcturus

@Brad1,

 

While you can use a Regular Expression to get your desired results (Below), the RegEx is a more expensive function than the find/replace.  It also requires a little more testing and is a little more difficult to train your successor in.

 

REGEX_Replace( REGEX_Replace( 
		REGEX_Replace([Address], "\bSt\b", 'Street'),"\bAve\b",'Avenue'),"\bSte\b",'Suite')

Cheers,

 

Mark 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels