Skip to content

Instantly share code, notes, and snippets.

@indatawetrust
Created August 11, 2018 10:32
Show Gist options
  • Save indatawetrust/e799ae6f33186a4f145c99e643ba7a10 to your computer and use it in GitHub Desktop.
Save indatawetrust/e799ae6f33186a4f145c99e643ba7a10 to your computer and use it in GitHub Desktop.
void main() {
String str = "\"property_map_location\": [ \"a:2 {s:8:\"latitude\";s:9:\"13.143044\";s:9:\"longitude\";s:10:\"-61.165210\";}\" ]";
RegExp exp = new RegExp(r's:[0-9]{1,}:"([-0-9.]+)";');
Iterable<Match> matches = exp.allMatches(str);
matches.toList().forEach((item) {
print(double.parse(item[1]));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment