正则表达式从字符串中拆分地理坐标

MWH*_*MWH 1 java regex android

我在字符串中有地理坐标,如下面给出的那样.

[79.9016492,6.8632761]
Run Code Online (Sandbox Code Playgroud)

我需要将两个数字分开为double值.有人可以帮我写一个正则表达式吗?

Ily*_*lya 6

对于[79.9016492,6.8632761]字符串,它是

String[] oxoy = "[79.9016492,6.8632761]".split("[\\[\\],]"); 
String x = oxoy[1]; // 79.9016492
String y = oxoy[2]; // 6.8632761 
Run Code Online (Sandbox Code Playgroud)

Ideone DEMO

转换为双倍

Double x1 = Double.valueOf(x);
Double y1 = Double.valueOf(y);
Run Code Online (Sandbox Code Playgroud)