<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Label"><a href="www.123.com">123</a><a href="www.456.com">456</a> <a href="www.789.com">789</a> </asp:Label>
<asp:ListBox ID="ListBox1" runat="server" Height="166px" Width="271px"></asp:ListBox>
</div>
<div>
<asp:Label ID="Label1" runat="server" Text="Label"><a href="www.123.com">123</a><a href="www.456.com">456</a> <a href="www.789.com">789</a> </asp:Label>
<asp:ListBox ID="ListBox1" runat="server" Height="166px" Width="271px"></asp:ListBox>
</div>
</form>
public void Geturl()
{
List<String> li = new List<String>();
MatchCollection matches = Regex.Matches(Label1.Text, @"<\s*a\s+[^>]*href\s*=\s*[""'](?<HREF>[^""']*)[""'][^>]*>(?<IHTML>[\s\S]+?)<\s*/\s*a\s*>", RegexOptions.IgnoreCase);
foreach (Match match in matches)
{
string s = match.Groups["IHTML"].Value + ":" + match.Groups["HREF"].Value;
li.Add(s);
ListBox1.Items.Add(s);
}
}