'去掉html中的table代码 Function OutTable(str) dim a,re set re=new RegExp re.pattern="<(?!img|br|p|div).*?>" re.global=true a=str OutTable=re.replace(a,"") End Function
Javascript lastIndex 正则表达式的一个...
看下面这段代码: function test(s){ var reg = /./g; console.log(reg.exec(s)); console.log(reg.lastIndex); var reg = /./g; console.log(reg.exec(s)); console.log(reg.lastIndex); } test("abcd"); test("efgh"); 我以为输出的lastIndex的值应该都是1,但是实际上的输出如下: a 1 a 1 f 2 f 2 感觉就像是在第二次调用t...