Lets say i have a string like this:
location: Location[gps 39.549497,-120.328997 hAcc=20 et=+44m40s745ms alt=0.0 vel=0.0 bear=0.0 vAcc=??? sAcc=??? bAcc=??? {Bundle[mParcelledData.dataSize=96]}]
I want to extract 39.549497 and -120.328997
i have tried with the below code:
Pattern p = Pattern.compile("[0-9]+[.][0-9]+");
Matcher m = p.matcher(logLat);
while (m.find()) {
Log.i("found is", m.group());
}
but could not get the negative number.