Merge branch 'script_gj' into 'master'

update

See merge request !1071
This commit is contained in:
2025-02-07 13:48:07 +08:00
@@ -909,14 +909,18 @@ class FiledStrand {
} }
static def getNumber(def input) { static def getNumber(def input) {
Pattern pattern = Pattern.compile("\\d+(\\.\\d+)?"); try{
Matcher matcher = pattern.matcher(input); Pattern pattern = Pattern.compile("\\d+(\\.\\d+)?");
List<String> list = new ArrayList(); Matcher matcher = pattern.matcher(input);
while (matcher.find()) { List<String> list = new ArrayList();
list.add(matcher.group()); while (matcher.find()) {
} list.add(matcher.group());
if(list.size()>0){ }
return list.get(0); if(list.size()>0){
return list.get(0);
}
}catch(Exception e){
println input+" error"
} }
return null; return null;
} }