static void Main(string[] args) { string atxet = @"32323
323343434
"; Regex reg = new Regex(@"http://([a-zA-Z0-9-/ _]+)+.(gif|png|jpg)", RegexOptions.IgnoreCase); MatchCollection matchs = reg.Matches(atxet); foreach (Match item in matchs) { if (item.Success) { Console.WriteLine(item.Value); //这里就是匹配到的项 } } Console.Read(); }