ASP.NET中17种正则表达式

来源:互联网 发布:windows mobile刷机包 编辑:程序博客网 时间:2024/05/19 13:29
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
(正整数 0)
"^[0-9]*[1-9][0-9]*$"  //正整数
"^((-/d )|(0 ))$"  //非正整数(负整数 0)
"^-[0-9]*[1-9][0-9]*$"  //负整数
"^-?/d $"    //整数
"^/d (/./d )?$"  //非负浮点数(正浮点数 0)
"^(([0-9] /.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*/.[0-9] )|([0-9]*[1-9][0-9]*))$"  //正浮点数
"^((-/d (/./d )?)|(0 (/.0 )?))$"  //非正浮点数(负浮点数 0)
"^(-(([0-9] /.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*/.[0-9] )|([0-9]*[1-9][0-9]*)))$"  //负浮点数
"^(-?/d )(/./d )?$"  //浮点数
"^[A-Za-z] $"  //由26个英文字母组成的字符串
"^[A-Z] $"  //由26个英文字母的大写组成的字符串
"^[a-z] $"  //由26个英文字母的小写组成的字符串
"^[A-Za-z0-9] $"  //由数字和26个英文字母组成的字符串
"^/w $"  //由数字、26个英文字母或者下划线组成的字符串
"^[/w-] (/.[/w-] )*@[/w-] (/.[/w-] ) $"    //email地址
"^[a-zA-z] ://(/w (-/w )*)(/.(/w (-/w )*))*(/?/S*)?$"  //url<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>