Word Boundary
The regular expression is wrapped in a word boundary to ensure it matches the entire word. Words are comprised of alphanumeric character (a-z, A-Z, 0-9) and the boundary cannot contain a word character on each side of the boundary.
Example:When the regular expression is cat
, the sentence "The cat chased the mouse" will match, but "The catchased the mouse" will not match.