var words ="hello word hello word hello word";
//一.console.log(words.match(/hello\s+word/g));
//二.
function pipei(words){
//匹配
return words.match(/hello\s+word/);
}
console.log(pipei(words));
var words ="hello word hello word hello word";
//一.console.log(words.match(/hello\s+word/g));
//二.
function pipei(words){
//匹配
return words.match(/hello\s+word/);
}
console.log(pipei(words));