记录几个采用的正则表达式

前端之家收集整理的这篇文章主要介绍了记录几个采用的正则表达式前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
private static Regex RegCHZN = new Regex("[一-龥]");//所有汉字 private static Regex RegDecimal = new Regex("^[0-9]+[.]?[0-9]+$");//正小数 private static Regex RegDecimalSign = new Regex("^[+-]?[0-9]+[.]?[0-9]+$");//正负数 private static Regex RegEmail = new Regex(@"^[\w-]+@[\w-]+\.(com|net|org|edu|mil|tv|biz|info)$");//邮件 private static Regex RegMobilePhone = new Regex("^1[3|4|5|8][0-9]\d{8}$");//电话号码 private static Regex RegMoney = new Regex("^[0-9]+|[0-9]+[.]?[0-9]+$");//整数或小数 private static Regex RegNumber = new Regex("^[0-9]+$");//整数 private static Regex RegNumberSign = new Regex("^[+-]?[0-9]+$");//正负整数 private static Regex RegSend = new Regex("[0-9]{1}([0-9]+){5}");// 邮政编码 private static Regex RegTell = new Regex("^(([0-9]{3,4}-)|[0-9]{3.4}-)?[0-9]{7,8}$");//电话号码 private static Regex RegUrl = new Regex(@"^[a-zA-z]+://(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?|[a-zA-z]+://((?:(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d?\d))$");//地址 原文链接:https://www.f2er.com/regex/362622.html

猜你在找的正则表达式相关文章