Improve HasRegexMetaChars performance