FF的正则表达式神奇的负索引属性
March 10th, 2010
查了各种文档,没发现记载,可能是非正式属性
分别对应于正则表达式对象的6个属性
-1 : source
-2 : global
-3 : ignoreCase
-4 : lastIndex
-5 : multiline
-6 : sticky
比如 /a/[-2] 相当于 (/a/).global
查了各种文档,没发现记载,可能是非正式属性
分别对应于正则表达式对象的6个属性
-1 : source
-2 : global
-3 : ignoreCase
-4 : lastIndex
-5 : multiline
-6 : sticky
比如 /a/[-2] 相当于 (/a/).global
Recent Comments