Hi All,
Please find below the example of the logic I want to build:
A | B | Expected Output |
BRING FOOD | RING | No match |
RING A BELL | RING | Match |
This is just a sample but this is what I am trying to do. I tried using FindString([A],[B]) but it gives match in the first case as well. How can I check if the complete word present in Field B of a particular row present in String Field A in that row?
Thanks for your support.
Solved! Go to Solution.
Hi @Ruchik --
Have you tried using the Contains function? That do exactly what you need.
Thanks,
Seth
Hi @smoskowitz,
Contains also returns match for a substring (For both the cases I mentioned). I am only looking for a match when its a complete word.
I would use a FIND REPLACE tool and configure it to be a whole word match. You can also set it to be Case insensitive. Given a list of words, it can append the found word.
also: Regex_Match([field],".*\bRING\b.*")
cheers,
mark
Hi @MarqueeCrew
Thanks for your response. I had a small doubt with reference to RegEx as am new to it.
As "ring" was just an example, I want to compare column B with A.
Will the below syntax work?
Regex_Match([A],".*\b[B]\b.*")
Let's first add test cases to your data. They include more complexity.
DO NOT BRING RING No match
DO NOT RING RING Match
OK, RING TWICE RING Match
IF
Getword([A],0) = [B] THEN "Match" ELSEIF
Contains([A]," "+[B]+" ") THEN "Match" ELSEIF
GetWord([A], CountWords([A])-1) = [B] THEN "Match"
ELSE "No match"
ENDIF
This logic looks for the first word as a match, a whole word as a match and the LAST word as a match.
Cheers,
Mark