纬度校验:
var latRex ="//^[\-\+]?((0|([1-8]\d?))(\.\d{1,10})?|90(\.0{1,10})?)$//";
经度校验:
var lonRex ="/^(\-|\+)?(((\d|[1-9]\d|1[0-7]\d|0{1,3})\.\d{0,6})|(\d|[1-9]\d|1[0-7]\d|0{1,3})|180\.0{0,6}|180)$/"
年-月-日、年-月正则校验
String fillingMonth ="2023-05-05";Pattern pat =Pattern.compile("[1-9][0-9][0-9][0-9]\\-([0][1-9]|[1][0-2])\\-([0][0-9]|[1][0-9]|[2][0-9]|[3][0-1])");Pattern month =Pattern.compile("[1-9][0-9][0-9][0-9]\\-([0][1-9]|[1][0-2])");Matcher isNum = pat.matcher(fillingMonth);