首页 > 技术文章 > /[\u4e00-\u9fa5]/汉字的正则匹配
feng12345 2016-04-10 17:31 原文
var value = str.replace(/[\u4e00-\u9fa5]/g," "); //将汉字替换为两个空格 return value.length;