[\u4e00-\u9fa5]
example:
// replace Chinese char with "**"
var textLength = text.replace(/[\u4e00-\u9fa5]/g,"**").length;
zacxu 2018-12-14 12:00 原文
[\u4e00-\u9fa5]
example:
// replace Chinese char with "**"
var textLength = text.replace(/[\u4e00-\u9fa5]/g,"**").length;