Switch to using regular expression for IsWhiteSpace