Exclude newlines in word regex

This prevents the word range from spanning multiple lines.

Fixes #40