community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Replace formula with Wildcard

Highlighted
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.

Alteryx Certified Partner
Alteryx Certified Partner

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