且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

TextBox仅包含int和Decimal值

更新时间:2023-11-12 15:42:46

您的正则表达式本身说,它只接受数字.所以
使用此正则表达式.可能会对您有帮助.
your regular expression itself say its going to accept only digits. so
Use this regular expression. it may help you.
/^\d+\.?\d*


/


使用此表达式

Use this expression

[0-9]+(\.[0-9][0-9]?)?



在线检查此表达式.
http://www.regexplanet.com/advanced/java/index.html [ ^ ]



Check this expression in online itself.
http://www.regexplanet.com/advanced/java/index.html[^]