So i want to replace an normal email for example: "teste123@test.com"
to
"teste123 < b style ='display : none ;' > null < / b >@test.com"`
until now I've got this:
string expression = @"(([^<>()\[\]\\.,;:\s@']+(\.[^<>()\[\]\\.,;:\s@']+)*)|('.+'))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))";
Regex rx = new Regex(expression);
MatchCollection matches = rx.Matches(conteudo.PaginaConteudo);
Console.WriteLine("{0} matches found in:\n {1}",
matches.Count,
conteudo.PaginaConteudo);
string email,
replacement = "<h5 style='display:none;'>null</h5>",
mailenc,
correctString;
foreach (Match emails in matches)
{
email = emails.Value;
mailenc = "<h5>"+email + replacement+"</h5>";
correctString = conteudoOriginal.PaginaConteudo.Replace(email, mailenc);
conteudoOriginal.PaginaConteudo = correctString;
}