I am trying to pull out values for lat and lng for the following:
coordinates =
[<div class="store-map">\n<div id="map" style="width: 100%; height: 400px;"></div>\n<script>\r\n function initMap() {\r\n var myLatLng = {\r\n lat: 42.050994,\r\n lng: -88.077711 };\r\n\r\n
However, when I apply this regex -
found = re.search('lat:(.*),', coordinates,).group(1)
Everything after "lat:" is returned.
However, the desired result is just the number, that stops as soon as it reaches the comma.
This is odd to me, because even rubular shows that code should work.
Any ideas on what I could be doing wrong here?
P.S. I have spent a bit of time, and looked at all related solutions on stackoverflow, however - no dice.
r'lat:(\d[\d.]*)'