avoid querySelector error

avoid querySelector error by using more strict regular expression.