做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

幾個C#常用正則表達式的總結

來源:懂視網 責編:小采 時間:2020-11-27 22:45:53
文檔

幾個C#常用正則表達式的總結

幾個C#常用正則表達式的總結:using System; using System.Text.RegularExpressions; namespace CommonTools { /**//// <summary> /// RegexLib 的摘要說明。 /// </summary> public class RegexLib { //驗證Email地址
推薦度:
導讀幾個C#常用正則表達式的總結:using System; using System.Text.RegularExpressions; namespace CommonTools { /**//// <summary> /// RegexLib 的摘要說明。 /// </summary> public class RegexLib { //驗證Email地址

using System; 
using System.Text.RegularExpressions; 

namespace CommonTools 

/**//// <summary> 
/// RegexLib 的摘要說明。 
/// </summary> 
public class RegexLib 

//驗證Email地址 
public static bool IsValidEmail(string strIn) 

// Return true if strIn is in valid e-mail format. 
return Regex.IsMatch(strIn, @"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"); 

//dd-mm-yy 的日期形式代替 mm/dd/yy 的日期形式。 
public static string MDYToDMY(String input) 

return Regex.Replace(input,"\\b(?\\d{1,2})/(?\\d{1,2})/(?\\d{2,4})\\b","${day}-${month}-${year}"); 

//驗證是否為小數 
public static bool IsValidDecimal(string strIn) 

return Regex.IsMatch(strIn,@"[0].\d{1,2}|[1]"); 

//驗證是否為電話號碼 
public static bool IsValidTel(string strIn) 

return Regex.IsMatch(strIn,@"(\d+-)?(\d{4}-?\d{7}|\d{3}-?\d{8}|^\d{7,8})(-\d+)?"); 

//驗證年月日 
public static bool IsValidDate(string strIn) 

return Regex.IsMatch(strIn,@"^2\d{3}-(?:0?[1-9]|1[0-2])-(?:0?[1-9]|[1-2]\d|3[0-1])(?:0?[1-9]|1\d|2[0-3]):(?:0?[1-9]|[1-5]\d):(?:0?[1-9]|[1-5]\d)$"); 

//驗證后綴名 
public static bool IsValidPostfix(string strIn) 

return Regex.IsMatch(strIn,@"\.(?i:gif|jpg)$"); 

//驗證字符是否再4至12之間 
public static bool IsValidByte(string strIn) 

return Regex.IsMatch(strIn,@"^[a-z]{4,12}$"); 

//驗證IP 
public static bool IsValidIp(string strIn) 

return Regex.IsMatch(strIn,@"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$"); 



聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

幾個C#常用正則表達式的總結

幾個C#常用正則表達式的總結:using System; using System.Text.RegularExpressions; namespace CommonTools { /**//// <summary> /// RegexLib 的摘要說明。 /// </summary> public class RegexLib { //驗證Email地址
推薦度:
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 正安县| 东宁县| 惠安县| 柯坪县| 甘孜县| 白河县| 九龙城区| 黄山市| 光泽县| 黄冈市| 成武县| 陆河县| 宁明县| 谷城县| 怀集县| 德兴市| 陇川县| 海口市| 增城市| 德兴市| 库伦旗| 无锡市| 星座| 汉中市| 江源县| 托克托县| 新平| 澄迈县| 太原市| 达孜县| 饶河县| 浮山县| 天全县| 宿州市| 湄潭县| 灵丘县| 婺源县| 佛教| 紫金县| 富蕴县| 古丈县|