我有一种情况,需要从主给定字符串中分离数值和其他子字符串。
Suppose the main string is 350.55kph
.
Then my desired result is 350.55
as a numeric value and kph
is other substring.
有人可以帮我弄这个吗?
我有一种情况,需要从主给定字符串中分离数值和其他子字符串。
Suppose the main string is 350.55kph
.
Then my desired result is 350.55
as a numeric value and kph
is other substring.
有人可以帮我弄这个吗?
方法如下:
Note: This would work for strings containing multiple
Int
eg: "350km per 2hr". You would only require: