QString pattern("([-]*[0-9]{2,3}.[0-9]+),([-]*[0-9]{2,3}.[0-9]+)");
QRegExp rx(pattern);
QString line = "points.push(new GLatLng(64.084539881516,-21.953430550266));";
int pos = line.indexOf(rx); // 0, position of the first match.
qreal lat = rx.cap(1).toDouble();
qreal lng = rx.cap(2).toDouble();
非常感谢,按wxj120bw的办法搞定了!