How to replace the below string in C#
Current:
\"John K \"GEN\" Greg\"
The Goal:
\"John K \\\"GEN\\\" Greg\"
string MailFrom ="aaa@my.web.pk;\"PROMMS\" ccc@my.web.pk;"; string NewMailFrom = Regex.Replace(MailFrom, "\"[^\"]*\"", string.Empty); Results aaa@my.web.pk;ccc@my.web.pk;