Change use method to regexp.test() to regexp.exec()