var ss = "Is is the cost of of gasoline going up up?./n"; var re = //b([a-z]+) /1/b/gim; //创建正则表达式样式. var rv = ss.replace(re,"$1"); //用一个单词替代两个单词.
最接近的等价 VBScript 代码如下:
Dim ss, re, rv ss = "Is is the cost of of gasoline going up up?." & vbNewLine Set re = New RegExp re.Pattern = "/b([a-z]+) /1/b" re.Global = True re.IgnoreCase = True re.MultiLine = True rv = re.Replace(ss,"$1")