Book version:
\w - Letter (a-z, A-Z)
Correct version:
\w - Letter, Digit, Underscore [a-zA-Z0-9_]
This is similar to the syntax for alphanumeric: [:alnum:]