refs #5949 only escape a quantifier in case it is the first character