ASP.NET中的文本框正则表达式? [英] Textbox Regular Expression in Asp.net?

查看:68
本文介绍了ASP.NET中的文本框正则表达式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


任何机构都可以帮助我获得以下数字的正则表达式
0.009

条件:

起始数字始终为0或.
后 .只能输入3位数字.


真诚的
Pawan.

Hi
Could any body help me on getting regular expression for the following number
0.009

conditions:

start digit is always 0 or .
after . only 3digits should be allowed.


Sincerely,
Pawan.

推荐答案

听起来很琐碎.有一个名为Expresso的程序,那些不了解正则表达式的人可以下载以帮助构建它们.您是否想要三位数?如果是这样,您要指定一个可选的0,一个必需的.然后是3位数字.

([0-9]?(\.)[0-9] {3}

似乎是个不错的第一步.
Sounds pretty trivial. There''s a program called Expresso that people who don''t understand regular expressions can download for help building them. Do you want exactly three digits ? If so, you want to specify an optional 0, a mandatory . and then exactly 3 digits.

([0-9]?(\.)[0-9]{3}

Seems like a good first stab.


下面的表达式解决了我的问题
< pre>([0]?(\.)\ d {1,3})</pre>
Below Expression solves my issue
<pre>([0]?(\.)\d{1,3}) </pre>


这篇关于ASP.NET中的文本框正则表达式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆