var pos=‘point(12.4 -45.423453)‘;
var re = /([+]\d+[.]\d+|[-]\d+[.]\d+|\d+[.]\d+|[+]\d+|[-]\d+|\d+)/ig;
var r = "";
while(r = re.exec(pos)) {
console.log(r[0]);
}
时间: 2024-10-28 22:45:51
var pos=‘point(12.4 -45.423453)‘;
var re = /([+]\d+[.]\d+|[-]\d+[.]\d+|\d+[.]\d+|[+]\d+|[-]\d+|\d+)/ig;
var r = "";
while(r = re.exec(pos)) {
console.log(r[0]);
}