遍历js的array

一段代码段,没有什么别的。mark一下

//判断是否重复的正则

//判断是否重复的正则
//先用 join() 把数组转换成字符串且夹塞指定的分隔符 \x0f(这种分隔符用户一般是输不进来的),这一步纯粹是为简化且精确脚本而做。
//First with the join () to convert an array to a string and jam specified delimiter \ X0F (user does not input), this step is purely done to simplify and precise script.
function RegIteerate(arr)
{
	return /(\x0f[^\x0f]+)\x0f[\s\S]*\1/.test("\x0f"+ arr.join("\x0f\x0f") +"\x0f"); 
}

 奇妙的正则

posted @ 2013-05-06 17:09  wilsonChan  阅读(167)  评论(0编辑  收藏  举报