正则表达式的问题??
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"); //用一个单词替代两个单词.
返回的是 Is the cost of gasoline going up?
这是怎么匹配的,总是看不懂!!
如果ss 改为:"Is is is the cost of of of gasoline going up up up?.\n"
返回的怎么是 Is is the cost of of gasoline going up up?
还有就是re 中的 \1 改为 \2 什么就不行啦