Hello all,
I am trying to find an elegant way to convert multiple Contains function check to a single RegEx_Match function but not able to get good results. Any advise here
!Contains([Description],"trail")
AND
!Contains([Description],"mod")
AND
!Contains([Description],"chg")
Alternate:
REGEX_Match([Description],".*^[(mod),(chg),(trail)].*")
Solved! Go to Solution.
Try this one instead!
REGEX_Match([Field1],".*trail.*||.*mod.*||.*chg.*")
The || operates as an "or" and looks for anything that contains trail, mod, or chg anywhere in the field (putting the .* on either side allows for other characters before or after the words you're searching for).
Hope that helps!
Cheers,
NJ
Mine is similar to @NicoleJohnson:
!REGEX_Match([Description],".*(mod|chg|trail).*")
You only need a single | for alternatives in REGEX
A similar post: Using-IN-within-a-Contains-function
@jdunkerley79 and I approached it the same way.
Thank you and it worked very elegantly.
Any idea on how to match this string "AC Pur off lse - - AI" with my unsuccessful attempt with REGEX_Match([Description],"^(AC ).*") ?
The following string does gets matched but not the one above.
AC Data Comm - - AIR2
does this do what you want?
REGEX_Match([Description],"^AC\s.*")
Cheers,
Mark
It worked with a correction that I had to make to another exclusion condition where I had the group match (CAP) typed as [CAP].
Thanks !