BUG: MatchRegex() "\b" doesn't work

In a Formula field, a regex with \b never matches anything.

The above Formula should match these entities, but doesn’t match any:

image

It seems you’re right, but I don’t know why :confused:
In the meantime, for your specific case, could you just use
[\W^]PM[\W$]
instead?

1 Like

Maybe a Unicode-related bug somewhere? Or escaping/quoting? SQL?

I think it would need to be something more like
(^|\W)PM($|^W)
because you can’t put ^ $ in a character class - it’s just a literal there.

You’re probably right - regex is not my strong point to be honest!