A word boundary is the regular expression construct (\b) that denotes a word boundary which indicates a pointer position that is ahead of and behind a word character and a non-word character or the other way around (\w\W or \W\w), and vice-versa for non-word boundaries (\B).
A word boundary is the regular expression construct \b
which allows asserting whether the current regex match pointer is in a word boundary.
It denotes a word boundary which indicates a pointer position that is ahead of and behind a word character and a non-word character or the other way around (\w\W
or \W\w
)
Non-word boundaries \B
, on the other hand, denotes a pointer position which is both ahead of and behind of word characters, or non-word characters. (\W\W
or \w\w
)