还是正则表达式…… /gim 这三个字母分别是什么意思?
这是 js 手册中的一部分
——————————————————————
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")
——————————————————————————
请问 G、I、M 都分别是什么意思,在什么情况下使用