Try non-greedy evaluation, that is, add a ? after the + or *.
E.g.
class Program
{
static void Main(string[] args)
{
string strInput = @"
<td width=""50%"" height=""19"">
<a href=""sample_weblink.htm"">
Sample Weblink</a></td>
<td width=""50%"" height=""19"">
";
var objMatch = Regex.Match(strInput, @"<a\s+href=[""'](.*?)[""']\s*>");
if (objMatch.Success)
{
Console.WriteLine("Match: {0}", objMatch.Groups[1].Value);
}
}
}
Note: the doubling of the quotes is needed to have embedded quotes in a @"..." string.
Cheers
Andi