Alteryx Designer Desktop Discussions

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

Replace formula with Wildcard

Brad1
11 - Bolide

Hi,

 

Is there a way to do a Replace with a Wildcard?

 

Store                          to                Store

Target Store# 123                        Target

 

So it would be:  Replace([Store], "Store# {wildcard here}", "")

 

Thanks in advance for any help.

1 REPLY 1
CharlieS
17 - Castor
17 - Castor

Yes, this is possible using the RegEx version of the replace function: REGEX_Replace(. Try using this formula:

 

REGEX_Replace([Store],"\s\Store#\s\d+","")

 

RegEx breakdown:

\s = space character

\Store# = matches the string 'Store#'

\s = space again

\d = digit character (0-9)

+ = one or more (referring to the digit character)

Labels