2016-11-06 43 views

回答

1

你应该在你身边做这个处理。使用正则表达式过滤从视觉API接收的字符串中的数字:

str="Text received 123,0"; 
number = str.replace(/\D/g,''); 

result: 123 
+0

我不认为这是他要求的。 – eden