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!
Solved! Go to Solution.
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
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