Regex / Java code to check the location coordinates in the format of lat,long (eg: -33.8688,151.2093) ?
This Java code / regex logic helps to solve this problem:
boolean isValidLocation;
String location= tools.getParamValue("Location");
java.util.regex.Pattern p = java.util.regex.Pattern.compile("^(-?\\d+(\\.\\d+)?),(-?\\d+(\\.\\d+)?)$");
java.util.regex.Matcher m= p.matcher(location);
isValidLocation = m.matches();
return isValidLocation;