I have a url with the following query string
¢er=37.793243,-122.421227
Keep in mind there are other coordinate query strings in the url. I'd simply like to grab the first pair. With the help of this post I get the following:
str.match(/[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)/);
["37.793243,-122.421227", "37.793243", ".793243", undefined, "122.421227", undefined, "122", "122", undefined, ".421227"]
What would I have to do to simplify the match where it returns the 37.793243
and -122.421227
in the array?
['37.793243', '-122.421227']