62,268
社区成员
发帖
与我相关
我的任务
分享
string href = "<img src=\"http://localhost:800/upload/day_120607/201206070455226349.jpg\" alt=\"\" />";
string img ="<IMG.+src.+=.?\"http.+(\\/upload\\/\\.+\\.(jpg|png|bmp|gif)).+\\/>";
string img2 = @".+http.+\\upload\\\.+\\.+\.(jpg|bmp|gif|png).+";
bool bl= Regex.IsMatch(href,img2, RegexOptions.IgnoreCase| RegexOptions.Multiline);
Console.WriteLine(bl);
Console.ReadKey();
string regex2 = @"<img.+src.+http.+(upload\/.+\.(jpg|gif|bmp|png)).+\/>";