Skip to content

Instantly share code, notes, and snippets.

@aragaer
Created November 26, 2011 17:49
Show Gist options
  • Select an option

  • Save aragaer/1396032 to your computer and use it in GitHub Desktop.

Select an option

Save aragaer/1396032 to your computer and use it in GitHub Desktop.
>>> for line in data:
... print "checking", line,
... m = re.search("latitude.*'(.*)'", line)
... if m:
... print m.group(1)
...
checking function geoip_country_code() { return 'RU'; }
checking function geoip_country_name() { return 'Russian Federation'; }
checking function geoip_city() { return 'Moscow'; }
checking function geoip_region() { return '48'; }
checking function geoip_region_name() { return 'Moscow City'; }
checking function geoip_latitude() { return '55.7522'; }
checking function geoip_longitude() { return '37.6156'; }
checking function geoip_postal_code() { return ''; }
checking function geoip_area_code() { return ''; }
checking function geoip_metro_code() { return ''; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment