Hello everyone
I keep trying to figure out but I couldnot and it sounds weird to me. Regex Replace is replacing specific phrase as I want , however regex match doesnot match same phrases. Any ideas?
Thank you in advance
Solved! Go to Solution.
Hi @slckkrky the REGEX_MATCH() function has to match the entire string, so if you change yours to:
REGEX_MATCH([field1],'.*(youth|region)+.*')
then you'll get what you want. You've also got your contains function round the wrong way. The first parameter of Contains() should be the string you're searching, the second is what you're searching for.
Hope that helps,
Ollie
Hi @slckkrky ,
For this method, it looks for full string matches rather than partial matches, so based on that, for that function to work, you need to insert .* at the beginning and the end to control anything else in your string.
.*(youth|region).*
Best,
Fernando V.
Hi @slckkrky
REGEX_Match considers the full expression, REGEX_Replace considers partial portions of the string.
You could use something like this:
REGEX_Match([Field1], ".*(youth|region).*")
This matches anything that has either youth or region on it.
Cheers,