如何转换一些:
1.5635679E7
至
15.635679
即科学记数法双倍到地理坐标?我认为使用正则表达式可能是一个好主意,但是我无法让它将 .
转换到字符串中的正确位置:
https://regex101.com/r/ZhZ7uu/1
只给出
1
和 5635679
。
正则表达式的风格是java。
最佳答案
您可以使用:
字符串 p1 = (\\.)(\\d);
然后:
Pattern r1 = Pattern.compile(p1);
r1.replaceAll("$2$1");
Note the
"$2$1"
will swap the positions of.
and5
关于java - 正则表达式将科学记数法转换为地理坐标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52903031/