I want to match a latitude and longitude entry, separated by comma and possibly with a name:
what should match
-43.48394, 87.394886
-43.44884, 88.344774, home
-43.87778, 88.987566,
what should not match
-43.89987, 89.345434 home
-43.44884, 88.344774, home, restaurant
This is what I've tried,
^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?),?(?<=,)[a-zA-Z ]*$
but fails to match
-43.48394, 87.394886
what am I missing here?
Thanks