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

Alteryx designer Discussions

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

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More
We will be upgrading the Gallery to our 2019.4 release this Saturday, December 7th beginning at 9:00am MT. We expect the outage to take last approx. 2.5 hours.
SOLVED

Replace formula with Wildcard

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