Skip to content

Instantly share code, notes, and snippets.

@iampato
Created May 21, 2020 20:38
Show Gist options
  • Save iampato/979732cf82977ee54c2bc09d98b743d3 to your computer and use it in GitHub Desktop.
Save iampato/979732cf82977ee54c2bc09d98b743d3 to your computer and use it in GitHub Desktop.
dart regex
void main(){
String res = "LatLng(-1.4752891, 36.39483943)";
String latitude = res.substring(res.indexOf("(")+1,res.indexOf(","));
String longtitude = res.substring(res.indexOf(",")+1,res.indexOf(")"));
print("Longitude $longtitude and latitude $latitude");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment