正则如何只取汉字
var str = "你好啊124只取汉字abc", reg = /[\u4e00-\u9fa5]/g; console.log(str.match(reg)); var result =str.match(reg); result.join("")
var str = "你好啊124只取汉字abc", reg = /[\u4e00-\u9fa5]/g; console.log(str.match(reg)); var result =str.match(reg); result.join("")