fix parenthesis and detection of word search in string mode (refs #4078)
Merge pull request #912 from Eric-Brison/3.2-I4078

fix parenthesis and detection of word search in string mode (fixes #4078)