You can also use `\b` to match the boundary between a "word character" (`\w`) and a non-"word character" (`\W`), which doesn't actually match a character and thus avoids the need to strip off the whitespace.