I have the string
"<Request 'http://127.0.0.1:5000/findrisk?latitude=32.7766642&longitude=-96.79698789999998' [GET]>"
and I am trying to get "latitude=32.7766642" and "longitude=-96.79698789999998"
I thought this would work:
re.findall('(latitude|longitude)=-?\d+.\d+', req)
basically, either latitude or longitude, followed by an equals sign, followed by an optional negative sign, followed by one or more digits, followed by a period, followed by one or more digits, but this is returning
['latitude', 'longitude']
I've tried online regex extractors and they are correctly extracting "latitude=32.7766642" and "longitude=-96.79698789999998", but python's re library isn't. Why is this the case?