<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