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

I want to filter on values that start with number and end with an alphabet

swarajjoshi
7 - Meteor

I have column like this:

Record No.Testing
13025155M
2A545621E
3PSHDBDP
42021232D
550451455

 

I want to add a filter in "Testing" which will only select values that starts with number and end with an alphabet, so from above example I want the 1st & 4th value i.e. 3025155M & 2021232D.

Note:- The number and alphabet will keep changing

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @swarajjoshi 

 

You can use this regex formula in filter tool

 

 

REGEX_Match([Testing], "\d.*\u")

 

 

Hope this helps 🙂

estherb47
15 - Aurora
15 - Aurora

Hi @swarajjoshi 

 

You can try something like this:

REGEX_Match([Testing], "\d.*[a-zA-Z]")

 

RegEx Match will look to match the entire string. The statement inside the quotes is starts with a digit and ends with an alpha.

 

Let me know if that works.

 

Cheers!

Esther

atcodedog05
22 - Nova
22 - Nova

Hi @swarajjoshi 

 

After seeing @estherb47 i remembered a approach which i learnt from her.

 

Use this in Filter tool.

 

 

REGEX_Match([Testing], "\d.*\D")

 

 

\D checks that the string doesnt end with number

 

Workflow:

atcodedog05_0-1622560179126.png

 

Hope this helps 🙂

swarajjoshi
7 - Meteor

Hey @estherb47  Thanks for your response.
It really worked well, thanks a lot

swarajjoshi
7 - Meteor

Thanks for your response too! @atcodedog05 

That also helped a lot.

Labels