Alteryx Designer Desktop Discussions

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

Filter with Regex for Specific word + character + digit

Doc-blue
5 - Atom

Hi All, 

I struggle to find a way to filter for a specific list of Word followed by a "-" and digit.

Example
BRE-5555
ATT-8888
CCC-123
BRE-123 / 456
BRE-1234 / 456
ATT 789

The goal, is to filter out the cell that have the format expect (only the words BRE or ATT followed by a "-" followed with 3 or 4 digit. Anything that doesn't follow this rules is filtered out. So, only BRE-XXXX or BRE-XXX or ATT-XXXX or ATT-XXX

Meaning in the example above, only these one are right: 

BRE-5555
ATT-8888


Everything will be considered as wrong, I am able to filter per word with a simple filter tool, or the digits with regex, but not to make the full rule in one filter with Regex. I can have to different filter, one for BRE one for ATT, but I am unable to make the filtering working for the full word + "-" + 3 or 4 digits

2 REPLIES 2
binuacs
20 - Arcturus

@Doc-blue one way of doing this

image.png

Doc-blue
5 - Atom

Thank you @binuacs! It worked perfectly! It helped me also to understand what I was doing wrong! 

Labels