Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex 正则表达式仅匹配货币中的数字_Regex_Vb.net - Fatal编程技术网

Regex 正则表达式仅匹配货币中的数字

Regex 正则表达式仅匹配货币中的数字,regex,vb.net,Regex,Vb.net,我试图让VB正则表达式只匹配货币序列中的数字,如果可能的话,不需要额外的替换行。它需要寻找一个带有+端的数字,在开始时返回中间的,减去逗号。< /P> 相应地 $10,000+ match returns 10000 $20,000+ match returns 20000 $30,000+ match returns 30000 $1,000,000+ match returns 1000000 $10,000 (anything without the trailing +) sh

我试图让VB正则表达式只匹配货币序列中的数字,如果可能的话,不需要额外的替换行。它需要寻找一个带有+端的数字,在开始时返回中间的,减去逗号。< /P> 相应地

 $10,000+ match returns 10000

$20,000+ match returns 20000

$30,000+ match returns 30000

$1,000,000+ match returns 1000000

$10,000 (anything without the trailing +) should *not* match
我可以很容易地获得与值的匹配,但我不知道如何去掉尾随+或前缀和逗号。

您的正则表达式是
\$(\d+(,?\d+*)\+
。第一组就是您要找的
检查

检索结果后,应删除其中的逗号