日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

對C#中正則表達式的一些解讀和總結(jié)(7)_.Net教程

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!

推薦:從Internet上抓取指定URL的源碼的方案(C#)
引言:   在做無線項目的時候,與通訊公司的數(shù)據(jù)通訊有一部分是通過XML交互的,所以必須要動態(tài)抓取通訊公司提供的固定的Internet上的數(shù)據(jù),便研究了一下如何抓取固定url上的數(shù)據(jù),現(xiàn)與

聯(lián)接多行字符串中的行

string t13 = @"this is

  a split line";

  string p13 = @"\s*\r?\n\s*";

  string r13 = Regex.Replace(t13, p13, " ");

提取字符串中的所有數(shù)字

string t14 = @"
   test 1
   test 2.3
   test 47
   ";
   string p14 = @"(\d \.?\d*|\.\d )";
   MatchCollection mc14 = Regex.Matches(t14, p14);

找出所有的大寫字母

string t15 = "This IS a Test OF ALL Caps";

  string p15 = @"(\b[^\Wa-z0-9_] \b)";

  MatchCollection mc15 = Regex.Matches(t15, p15);

找出小寫的單詞

string t16 = "This is A Test of lowercase";

  string p16 = @"(\b[^\WA-Z0-9_] \b)";

  MatchCollection mc16 = Regex.Matches(t16, p16);

找出第一個字母為大寫的單詞

string t17 = "This is A Test of Initial Caps";

  string p17 = @"(\b[^\Wa-z0-9_][^\WA-Z0-9_]*\b)";

  MatchCollection mc17 = Regex.Matches(t17, p17);

找出簡單的HTML語言中的鏈接


string t18 = @"

  <html>

  <a href=""first.htm"">first tag text</a>

  <a href=""next.htm"">next tag text</a>

  </html>

  ";

  string p18 = @"<A[^>]*?HREF\s*=\s*[""']?" @"([^'"" >] ?)[ '""]?>";

  MatchCollection mc18 = Regex.Matches(t18, p18, "si");

分享:ASP.NET對IIS中的虛擬目錄進行操作
//假如虛擬目錄名為"Webtest",先在項目中引用 //System.DirectoryServices.dll,再 using System.DirectoryServices; protected System.DirectoryServices.DirectoryEntry di

共7頁上一頁1234567下一頁
來源:模板無憂//所屬分類:.Net教程/更新時間:2008-08-22
相關(guān).Net教程