var
str=
"1件*20桶*30包*123.45公斤"
;
res=str.match(/\d+(\.\d+)?/g);
alert(res);
java_js从字符串中截取数字
原文:http://www.cnblogs.com/zxxbk/p/6245661.html