正则表达式札记2

正则表达式笔记2表1.常用的元字符代码说明console.info( 汉字.replace( /[^\x00-\xff]/g,aa ).length

正则表达式笔记2

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

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

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

?

?