striveCode icon indicating copy to clipboard operation
striveCode copied to clipboard

正则题目

Open itstrive opened this issue 8 years ago • 0 comments

var str='welcome';

console.log(/^^^^welcome$$$/.test(str));  // 答案是多少为什么?
console.log(str.replace(/(?=l)/g,'#'));  //答案为?
console.log(str.replace(/(?!l)/g,'#'));   // 答案为?

itstrive avatar Oct 10 '17 01:10 itstrive