我需要使用RegEx删除数字之间的空格,这意味着我想要像{lhs: \"1000 U.S. dollars\",rhs: \"58 740.6015 Indian rupees\",error: \"\",icc: true}一样从输入中生成一个格式化的数字,我尝试了下面的表达式Regex regex = new Regex("rhs: \\\"(\\d+.\\d*)");,但是它给了我一个错误的“输入格式不正确”,所以我如何删除数字之间的空格?
P.S货币名称每次调用时都会更改
发布于 2013-06-19 10:49:56
使用以下表达式
string value = Regex.Replace(response.Split(',')[1], "[^.0-9]", "");https://stackoverflow.com/questions/17187534
复制相似问题