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
I found the solution and updated the regex syntax to REGEX_Match([Data], "\d{0,3}.\s{0,1}[A-Za-z\-\_\s]+") these matches well , anyway thanks for the initial help!
Hi @ssaz
What is the complete input.
What is the output tried to achieve please.
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.
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.
@ssaz One way of doing this
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.
@ssaz updated the filter logic
One more way to get True or False output.
@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. TOPIC22. SHARE CAPITAL2. SHARE-CAPITALi 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
@ssaz
I realised one more thing my criteria for the words supposedly matching for all uppercase characters only, i updated the regex to this REGEX_Match([Data], "\d{1,3}\.\s+[A-Z\-\_\s]+") but not working to get pattern of numbers with uppercase alphabet.
@ssaz attaching the regex
REGEX_Match([Input], '^\d{1,}.*[A-Z]+[\s\-]?[A-Z]+$',0)
@binuacs
seems like the above regex capturing this pattern as well "3.2c Standard by ABCD"
I have updated the regex to this REGEX_Match([Data], "\d{1,}\.\d{1}\s+[A-Z\-\_\s]+$",0) orREGEX_Match([Data], "\d{1,}\.\s+[A-Z\-\_\s]+$",0), its working almost perfect now just not efficient enough since need to use both regex pattern
@ssaz please try
^\d{1,}\.\s.*[A-Z]+[\s\-]?[A-Z]+$