Commit d01e3da0 authored by tianbo's avatar tianbo

fix(amos-boot-module-jg): 修正管道规格正则表达式

- 替换原有的正则表达式,以更准确地匹配管道规格 - 新正则表达式支持 0 或者以非零数字开头的数字,后跟可选的小数部分 -允许使用 - 或 / 连接多个数字,支持复杂的管道规格格式
parent 0ec71413
......@@ -1540,7 +1540,7 @@ public class DataDockServiceImpl {
* @param rowError
*/
public void checkPipeSpecifications(String item, String errorMessage, StringBuffer rowError) {
String regex = "^\\d(\\d*[.]?\\d*)([-/]\\d*[.]?\\d*)?$";
String regex = "^(?:0|[1-9]\\d*(?:[.]\\d*)?)((?:[-/](?:0[.]\\d+|[1-9]\\d*(?:[.]\\d*)?))?)+$";
if (!item.matches(regex)) {
rowError.append(errorMessage);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment