In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

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
Top Solution Authors