What's a C# regular expression that'll validate currency, float or integer?

前端 未结 8 2431
闹比i
闹比i 2020-12-06 12:21

What is a regular expression suitable for C# that\'ll validate a number if it matches the following?

 $1,000,000.150
 $10000000.199
 $10000 
 1,         


        
8条回答
  •  忘掉有多难
    2020-12-06 13:16

    Use this regular expression for US currency \$(\d)*\d Matches $300,$12900 Non-Match $12900.00

提交回复
热议问题