update
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user