<a href="http://www.try.com"><strong>Try link word</strong></a>
你好。我怎么能采取的我怎样才能把一部分字符串与C#4.0正则表达式
http://www.try.com和尝试链接字
用C#4.0的正则表达式这个字符串的一部分?
我试过但没有工作;
var expression = @"<a href=""(.*?)""><strong>(.*?)</strong>";
Match m = Regex.Match(text, expression);
while (m.Success)
{
Response.Write("Match: " + m.Groups[0] + " <br> Area code: " + m.Groups[1] +"<br><hr><br>");
m = m.NextMatch();
}
没有工作怎么样?你得到了什么? – 2013-03-08 14:55:29
它是打印= 尝试链接字
区号:http://www.try.com – ASPMaker 2013-03-08 15:03:57