Skip to content

Commit

Permalink
Feat: enhance float regex
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbet committed Jul 3, 2024
1 parent 72fa2b0 commit c3cd559
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public static void checkDateFormat(String dateFormat) throws ArlasException {
}

public static boolean isBboxMatch(String geometry) {
String floatPattern = "[-+]?[0-9]*\\.?[0-9]+";
String floatPattern = "[+-]?(\\d+([.]\\d*)?([eE][+-]?\\d+)?|[.]\\d+([eE][+-]?\\d+)?)";
String bboxPattern = floatPattern + "," + floatPattern + "," + floatPattern + "," + floatPattern;
return Pattern.compile("^" + bboxPattern + "$").matcher(geometry).matches();
}
Expand Down

0 comments on commit c3cd559

Please sign in to comment.