function _search(string) { // 补全代码 let reg=new RegExp('\\d') return reg.test(string) }//利用正则表达式求解 //js的test()方法用于检测一个字符串是否匹配某个格式,返回值为Boolean类型