Little trouble by getting the email in html text
string istr = "<a href = 'mailto:myemail@mail.com'>Email owner</a>";
protected void Button1_Click(object sender, EventArgs e)
{
// var emailregex = new Regex(@"\b\S+@mail\.com\b", RegexOptions.IgnoreCase | RegexOptions.Compiled);
var emailregex = new Regex(@"\b(?<mail>[a-zA-Z_0-9.-]+\@[a-zA-Z_0-9.-]+\.\w+)\b", RegexOptions.IgnoreCase | RegexOptions.Compiled);
Label1.Text = emailregex.Replace(istr, "${mail}");
}
I failed to get the "myemail@mail.com". the output is full html string
any idea?