public static String validateLatLong(String s){
  String regex_coords="^(\\(\\-?\\d+(\\.\\d+)?),\\s*(\\-?\\d+(\\.\\d+)?\\))$";
  Pattern compiledPattern2=Pattern.compile(regex_coords,Pattern.CASE_INSENSITIVE);
  Matcher matcher2=compiledPattern2.matcher(s);
  while (matcher2.find()) {
    return "Valid";
  }
  return "Invalid";
}

public static String validateLatLong ( String s ) { String regex_coords = "^(\\(\\-?\\d+(\\.\\d+)?),\\s*(\\-?\\d+(\\.\\d+)?\\))$" ; Pattern compiledPattern2 = Pattern . compile ( regex_coords , Pattern . CASE_INSENSITIVE ) ; Matcher matcher2 = compiledPattern2 . matcher ( s ) ; while ( matcher2 . find ( ) ) { return "Valid" ; } return "Invalid" ; }
validates latitude / longitude in the form ( + 75 , 180 ) etc .
