读书人

正则表达式札记2

发布时间: 2012-10-11 10:16:10 作者: rapoo

正则表达式笔记2

表1.常用的元字符代码说明

console.info( "汉字".replace( /[^\x00-\xff]/g,"aa" ).length ) // 4

console.info( "abc汉字".replace( /[^\x00-\xff]/g,"aa").length ) // 7

?

?

读书人网 >Web前端

热点推荐