\b
(not /b
!) in a regular expression means a word boundary.. Since you wanted to look for words this zero-length part simply is needed for the functionality.
Otherwise you wouldn’t find words but substrings. See See: Regex Tutorial - \b Word Boundaries
This isn’t hair-splitting at all, but very relevant for a related functionality in many cases.
Using a RegEx in a similar case without the word boundaries, you would find sex in Essex, and cat, cater, pill, ill in caterpillar. Seeing it case-insensitive, the caterpillar would even contain the ERP (European Recovery Programme).
Searching for arnbitrary substrings, on the other hand, you can’t use REGEX() anyway, because many of the expactable characters have a special meaning in RegEx and cannot be searched as literals without a specific escape construct.
The alternative woiuld be -for the logical result- NOT(ISERROR(FIND(SubString; TargetString)))
.