php使用正则表达式替换全角字符
php使用正则表达式替换全角字符 利用正则表达式替换字符串中的全角字符**php使用正则表达式替换全角字符**[代码片段(5行)]
利用正则表达式替换字符串中的全角字符
function zo_replace(text) { return text && text.replace(/[\u3000\uff01-\uff5f]/g, function($0) { return $0 == "\u3000" ? " " : String.fromCharCode($0.charCodeAt(0) - 0xfee0); }); }
精彩图集
精彩文章