ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

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

How to club case insensitive search with regex_match

ferha_jafri
6 - Meteoroid

Hello Team,

 

I have a requirement in which I want look for the case insensitive string and then match it with a particular string to get the result.

Eg. in a column I have a string "pattern to be follow"  so I want to search for "pattern to" with wildcard and then get the complete string "pattern to be follow"  and then compare it with other field with case insensitive search i.e. it should get all strings with "pattern to be follow" irrespective of the case.

 

Thanks in advance

phottovy
11 - Bolide

Hi @ferha_jafri,

 

By default, the regex_match formula is case insensitive. In the image below, you can see the third option "icase=1" allows you to tell the formula to either be case sensitive (0) or case insensitive (1). Let me know if I missing something in your question. 

 

phottovy_0-1620146961019.png

 

ferha_jafri
6 - Meteoroid

Thanks, my requirement is first I want to check for wild card I.e. first it will match first few characters in a string and then it will compare for case insensitive.  

phottovy
11 - Bolide

You should be able to accomplish this through RegEx. Do you have a couple examples that you can share?

ferha_jafri
6 - Meteoroid

For e.g. I have a column comment in which I have to compare part of comment with the initial few words like the complete comment is "interest rate is 5 % till march" so I want to compare "interest rate*" after comparison it should return the complete string which I will again compare for case insensitive I.e. it should return-1 for the match irrespective of the case.

Qiu
17 - Castor

@ferha_jafri 

Maybe we can try Find and Replace instead if you dont insist on using RegEx_Match?

Capture2A.PNGCapture2B.PNG

phottovy
11 - Bolide

Try the formula in the attached workbook. The ".*" basically says count anything past the words "interest rate" as a match.

Labels