We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

RegexMatch Digit and Alphabet

ssaz
6 - Meteoroid

Hello,

 

Appreciate if anyone could help on how to write regex to find the match for below:

 

31. TOPIC

 

I have tried (\d{2})(.)(\s+)([^a-z]+) which it works in regex101.com but not working in Alteryx.

 

Thanks

17 REPLIES 17
ShankerV
17 - Castor

Hi @ssaz 

 

What is the complete input.

What is the output tried to achieve please.

 

ShankerV
17 - Castor

Hi @ssaz 

 

Sorry to ask more questions, as you have used (\d{2})(.)(\s+)([^a-z]+) 

Each () helps to parse as a separate column, hence wanted to understand more what is the expected output.

 

Also input is more important too.

 

ssaz
6 - Meteoroid

Hi!

The input will have rows of string but i would like to filter the row with this pattern only: 31. TOPIC which start with numbers and then alphabet.

binuacs
21 - Polaris

@ssaz One way of doing this

binuacs_0-1675928479396.png

 

ssaz
6 - Meteoroid

Hi! The input will have rows of string but i would like to filter the row with this pattern only: 31. TOPIC which start with numbers and then alphabet.

ShankerV
17 - Castor

Hi @ssaz 

 

One way of doign this.

 

ShankerV_0-1675928631641.png

 

binuacs
21 - Polaris

@ssaz updated the filter logic

 

binuacs_0-1675928653100.png

 

ShankerV
17 - Castor

Hi @ssaz 

 

One more way to get True or False output.

 

ShankerV_0-1675928813033.png

 

 

ssaz
6 - Meteoroid

@binuacs @ShankerV

 

Thank you it works! but this regex syntax "\d{2}\.\s[A-Z]+" and "\d{2}.\s{0,1}[a-z]+"not working if the alphabet having space or dash or starts with 1 digit only, example of other input

31. TOPIC
22. SHARE CAPITAL
2. SHARE-CAPITAL

i have updated to range for digit to "\d{0,3}.\s{0,1}[a-z]+" and it works well if the digit only 1 or 2 but still not working for other pattern of words with dash or space

Labels
Top Solution Authors