So I understand that in latitude max 8 characters, 6 of which go after the point and the sign "-", and in longitude max 9 characters, 6 go after the point and the sign "-".
preg_match('/^\d{2}.\d{6}$/D', $_GET['latitude']) preg_match('/^\d{3}.\d{6}$/D', $_GET['longitude']) // 57.904683, -122.210420 If so, how to correctly specify the optional minus in preg_match ?