正则表达式不好,无论有多少空格,我如何匹配模式?
var pattern = / void main$/; //here
var pool1 = "abdodfo void main";
var pool2 = "abdodfo void main";
console.log(pattern.test(pool1)); // true
console.log(pattern.test(pool2)); // must also be true
正则表达式不好,无论有多少空格,我如何匹配模式?
var pattern = / void main$/; //here
var pool1 = "abdodfo void main";
var pool2 = "abdodfo void main";
console.log(pattern.test(pool1)); // true
console.log(pattern.test(pool2)); // must also be true