[csharp]string pattern = string.Empty;
Regex r; Match m; r = new Regex(pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled); for (m = r.Match(strHtml); m.Success; m = m.NextMatch()) { if (string.IsNullOrEmpty(m.Groups[0].Value)) continue;
urlList.Add(m.Groups[0].Value); } [/csharp]
[csharp] @”((http|https|ftp|mms)://[0-9a-z-]+(.[_0-9a-z-]+)+(:[0-9]{2,4})?/?)”; // domain+port @”([.~_0-9a-z-]+/?)*”; // sub roots or sub directory @”(S+.[_0-9a-z]+??)?”; // file & extension string @”([_0-9a-z&=-]+)*”; // parameter @”^d{5}$”; // […]