|
@@ -982,7 +982,7 @@ let cbAnalyzer = {
|
|
|
},
|
|
},
|
|
|
//输入合法性
|
|
//输入合法性
|
|
|
inputLegal: function (exp) {
|
|
inputLegal: function (exp) {
|
|
|
- let ilegalRex = /[^0-9,\u4e00-\u9fa5,\+,\-,\/,\*,\(,\),.,{,},F,%]/g;
|
|
|
|
|
|
|
+ let ilegalRex = /[^0-9,\u4e00-\u9fa5,\+,\-,\/,\*,\(,\),.,{,},F,%、]/g;
|
|
|
return !ilegalRex.test(exp);
|
|
return !ilegalRex.test(exp);
|
|
|
},
|
|
},
|
|
|
//基数合法性、存在性
|
|
//基数合法性、存在性
|
|
@@ -1178,7 +1178,7 @@ let cbParser = {
|
|
|
},
|
|
},
|
|
|
//获取表达式中的中文式
|
|
//获取表达式中的中文式
|
|
|
getCN: function (expr) {
|
|
getCN: function (expr) {
|
|
|
- let cnRex = /\d*[\u4e00-\u9fa5]{1,}\({0,}[\u4e00-\u9fa5]{0,}\d*%*[\u4e00-\u9fa5]{0,}\){0,}[\u4e00-\u9fa5]{0,}/g;
|
|
|
|
|
|
|
+ let cnRex = /\d*[\u4e00-\u9fa5]{1,}\({0,}[\u4e00-\u9fa5]{0,}\d*%*、?[\u4e00-\u9fa5]{0,}\){0,}[\u4e00-\u9fa5]{0,}/g;
|
|
|
return _.filter(expr.match(cnRex), function (data) {
|
|
return _.filter(expr.match(cnRex), function (data) {
|
|
|
return data
|
|
return data
|
|
|
});
|
|
});
|