惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
V
V2EX
博客园 - 【当耐特】
V
Visual Studio Blog
宝玉的分享
宝玉的分享
D
DataBreaches.Net
Engineering at Meta
Engineering at Meta
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
News | PayPal Newsroom
Schneier on Security
Schneier on Security
I
InfoQ
博客园 - Franky
The GitHub Blog
The GitHub Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Commits to openclaw:main
Recent Commits to openclaw:main
AI
AI
WordPress大学
WordPress大学
Webroot Blog
Webroot Blog
L
LangChain Blog
Help Net Security
Help Net Security
V2EX - 技术
V2EX - 技术
TaoSecurity Blog
TaoSecurity Blog
O
OpenAI News
月光博客
月光博客
H
Hacker News: Front Page
F
Full Disclosure
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
SecWiki News
SecWiki News
S
Security Affairs
博客园 - 司徒正美
MyScale Blog
MyScale Blog
Vercel News
Vercel News
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Y
Y Combinator Blog
T
Tailwind CSS Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hacker News: Ask HN
Hacker News: Ask HN
N
News and Events Feed by Topic
J
Java Code Geeks
Simon Willison's Weblog
Simon Willison's Weblog
Recent Announcements
Recent Announcements
D
Darknet – Hacking Tools, Hacker News & Cyber Security
I
Intezer
The Last Watchdog
The Last Watchdog
博客园_首页
C
Check Point Blog
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell

博客园 - 杰客

一个关于pynoi游戏的C语言编程 大型网站架构 大型网站架构不得不考虑的10个问题 程序员自我培养 什么是SOA 用Date.ToString()输出中英文月份 - 杰客 - 博客园 深入浅出理解索引结构 学习正则表达式 让VS 2008支持Subversion(转) SQL Server 2000和2005通用分页存储过程 SQL里类似SPLIT的分割字符串函数 趣味智力题 程序员为什么单身?细数程序员"六宗罪"(摘抄) 存储过程的一些小技巧 Hello NHibernate c#2.0 System.Net.Mail 发送email ASP.NET2.0中配置文件的加密与解密(转载) (原创)整合 PayPal、VeriSign、Authorize.NET 在线支付 ASP.NET 2.0(C#)中System.Web.Caching的应用
ASP.NET中的常用正则表达式
杰客 · 2006-11-28 · via 博客园 - 杰客

"^\d+$"  //非负整数(正整数 + 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

/^13\d{9}$/gi手机号正则表达式
public static bool IsValidMobileNo(string MobileNo)
  {
   const string regPattern = @"^(130|131|132|133|134|135|136|137|138|139)\d{8}$";
   return Regex.IsMatch(MobileNo, regPattern);
  }

正则表达式--验证手机号码
13[0-9]{9}

实现手机号前带86或是+86的情况
^((\+86)|(86))?(13)\d{9}$

电话号码与手机号码同时验证
(^(\d{3,4}-)?\d{7,8})$|(13[0-9]{9})

提取信息中的网络链接:
(h|H)(r|R)(e|E)(f|F)  *=  *('|")?(\w|\\|\/|\.)+('|"|  *|>)? 

提取信息中的邮件地址:
\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* 

提取信息中的图片链接:
(s|S)(r|R)(c|C)  *=  *('|")?(\w|\\|\/|\.)+('|"|  *|>)?

提取信息中的IP地址:
(\d+)\.(\d+)\.(\d+)\.(\d+)   

提取信息中的中国手机号码:
(86)*0*13\d{9}   

提取信息中的中国固定电话号码:
(\(\d{3,4}\)|\d{3,4}-|\s)?\d{8}   

提取信息中的中国电话号码(包括移动和固定电话):
(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}   

提取信息中的中国邮政编码:
[1-9]{1}(\d+){5}   

提取信息中的中国身份证号码:
\d{18}|\d{15}   

提取信息中的整数:
\d+   

提取信息中的浮点数(即小数):
(-?\d*)\.?\d+   

提取信息中的任何数字  :
(-?\d*)(\.\d+)? 

提取信息中的中文字符串:
[\u4e00-\u9fa5]*   

提取信息中的双字节字符串  (汉字):
[^\x00-\xff]*