日期:2014-05-16 浏览次数:21243 次
function test17()
{
var r1=/(.)\1/g;
var str1="baaaabbc";
var arr;
while ((arr = r1.exec(str1)) != null)
{
window.alert(arr.index + "-" + arr.lastIndex + "\t" + arr);
}
}
function test18()
{
var r1=/(.)\2/g;
var str1="baaabbbc";
var arr;
while ((arr = r1.exec(str1)) != null)
{
window.alert(arr.index + "-" + arr.lastIndex + "\t" + arr);
}
}