You could try using (?<=\s)
before and (?=\s)
after in place of the \b
to ensure that there is a space before and after it, however you might want to also allow for the possibility of being at the start or end of the string with (?<=\s|^)
and (?=\s|$)
This will automatically exclude "words" with a .
in them, but it would also exclude a word at the end of a sentence since there is no space between it and the full stop.