var re1 = /(\d{1,3})+(?:\.\d+)?/g
var re2 = /[\u4e00-\u9fa5]{2,}/g
var str="11我22们33两个";
var arr1 = str.match(re1);
var arr2 = str.match(re2);
arr1=11,22,33
arr2=我,们,两个
本文共 222 字,大约阅读时间需要 1 分钟。
var re1 = /(\d{1,3})+(?:\.\d+)?/g
var re2 = /[\u4e00-\u9fa5]{2,}/g
var str="11我22们33两个";
var arr1 = str.match(re1);
var arr2 = str.match(re2);
arr1=11,22,33
转载于:https://www.cnblogs.com/doudou618/p/10006602.html