In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Find a case sensitive string from a multi value concatenated string

bobbybalan
7 - Meteor

Hello, How can I match a string in a concatenated string of values. For example CONCAT_STRING = '009', 'G56', 'w34'. If there is a match (case sensitive) with FIELD1 then set variable RESULT = 'Y'.

If FIELD1 =  'G56' then RESULT = 'Y'. If FIELD1 = 'g56' then RESULT = 'N'. 

 

I tried doing this - REGEX_Match([FIELD1], [CONCAT_STRING] , 0) but doesn't seem to work. How do I do a case sensitive match and assign the RESULT value based on match or non-match.

 

Thank you!

2 REPLIES 2
kathleenmonks
Alteryx Alumni (Retired)

Hi @bobbybalan,

 

The result will be -1 if the REGEX_Match is true, so you can change your formula to an if/else statement to get the result to be 'Y' or 'N' like this:

 

IF REGEX_Match([FIELD1], [CONCAT_STRING] , 0)
THEN "Y"
ELSE "N"
ENDIF

kathleenmonks
Alteryx Alumni (Retired)

And @bobbybalan, if the CONCAT_STRING field has multiple values in it, then you could change it from regex_match to a "contains" function like so:

 

if Contains([CONCAT_STRING], [FIELD1],0)
THEN "Y"
Else "N"
ENDIF

Labels
Top Solution Authors