Alteryx Designer Desktop Discussions

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

REGEX

suby
11 - Bolide

Hi All,

 

How to Filter only for Record 2 using REGEX.  i,e ABC - XYZ.

 

I want to exclude other records if it has ABC - XYZ with other values.

 

Attached sample workflow.

 

 

8 REPLIES 8
aatalai
14 - Magnetar

@suby put this into a filter tool 

 

REGEX_Match([Name],"\s*ABC - XYZ\s*")Screenshot 2024-08-13 130852.png

 

Let me know how you get on

suby
11 - Bolide

Thanks what if I have to find a way to find record 2,4,6 

aatalai
14 - Magnetar

@suby there are only 3 records, in the file you uploaded, or are you talking about more generally only wanting records 2,4,6 - if so use the select records tool

suby
11 - Bolide

Hi Sorry uploading the revised  WF.

 

In this case I want to find the records where it has got ABC  that is records 2,4,6. since this is just a sample data and in real word we have more combinations and it would be hard to put filters on it.

 

And even we have the ABC - **** Combination of records in 1,3 & 5 if that's the case then we want to exclude these records from output.

 

aatalai
14 - Magnetar

@suby update the filter to as follows REGEX_Match([Name],"\s*ABC - \w{3}\s*")

suby
11 - Bolide

Thanks for your solution one final thing is we have a pattern of  ABC - DEF******** like this as well but in you logic  it restricts to 3 letters.

 

 

([Name],"\s*ABC - \w{3}\s*")

 

 

aatalai
14 - Magnetar

try this

 

REGEX_Match([Name],"\s*ABC - \w+\s*")

suby
11 - Bolide

Great that works... Thanks

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels