fixed regular expression for detecting word boundaries