Hello,
I am trying to replace the @ by (at) in all emails in a text. Nothing is replaced.
I tried it in two ways but both don't produce any change:
string a = "my email is john@gmail.com and @01 or ab@cd are not emails. The following <a href="mary@gmail.com">mary@gmail.com</a> is an anchor";
string b = Regex.Replace(a, @"(?<name>\w+([-+.]\w+)+)@(?<domain>\w+([-.]\w+)*\.\w+([-.]\w+)*)", "${name}(at)${domain}");
string c = Regex.Replace(a, @"(?<=\w+([-+.]\w+)+)(at)(?>\w+([-.]\w+)*\.\w+([-.]\w+)*)", "(at)");
Could someone, please, help me out?
Thanks,
Miguel