12-01-2016, 04:09 PM
Macro Macro965
str s="{37.5K 134K 21.37K 2.351K 0.542K 0.017K 25 1,300 2,500K}"
REPLACERX r.frepl=&sub.Callback_str_replacerx
s.replacerx("\b\d+(?:,\d+)*(?:\.\d+)?K?\b" r)
out s ;;{37500 134000 21370 2351 542 17 25 1300 2500000}
#sub Callback_str_replacerx
function# REPLACERXCB&x
x.match.findreplace(",")
double d=val(x.match 2)
if(x.match.end("K")) d*1000
x.match=d