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

Using RegEx_replace to match certain pattern

rgmaier
5 - Atom

Hello,

 

I have a simple issue: Using Alteryx, I want to take a string, match a certain pattern and return the matched pattern.

This is my current approach:

ConsumerProducts&Retail</td><td><strong><fontcl

According to various sources and tools like regex101, the first matched sequence should be "CP:ConsumerProducts&Retail". However, Alteryx returns "<<<<". I am absolutely confused why it does that.

3 REPLIES 3
ivoller
12 - Quasar

Can you share a sample workflow? I'm not really sure what you're seeing here.

rgmaier
5 - Atom

Please find my sample workflow attached.

ivoller
12 - Quasar

Try:

 

Regex_Replace([Input],"([^\<]+).*","$1")

 

This will find the first string not containing the characters you exclude and save to $1.

Labels