using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
var email = "2011,01,10 a,john.doe@gimail.com";
string result;
string pattern = "gimail\\.";
string replacment = "gmail.";
Regex rgx = new Regex(pattern);
email= rgx.Replace(email, replacment);
pattern = @"(?<=\p{L}),";
replacment = ".";
rgx = new Regex(pattern);
result = rgx.Replace(email, replacment);
Console.WriteLine(result);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CglwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgl7CgkJdmFyIGVtYWlsID0gIjIwMTEsMDEsMTAgICBhLGpvaG4uZG9lQGdpbWFpbC5jb20iOwogICAgICAgIHN0cmluZyByZXN1bHQ7CiAgICAgICAgc3RyaW5nIHBhdHRlcm4gPSAiZ2ltYWlsXFwuIjsKICAgICAgICBzdHJpbmcgcmVwbGFjbWVudCA9ICJnbWFpbC4iOwoKICAgICAgICBSZWdleCByZ3ggPSBuZXcgUmVnZXgocGF0dGVybik7CgogICAgICAgIGVtYWlsPSByZ3guUmVwbGFjZShlbWFpbCwgcmVwbGFjbWVudCk7CgogICAgICAgIHBhdHRlcm4gPSBAIig/PD1ccHtMfSksIjsKICAgICAgICByZXBsYWNtZW50ID0gIi4iOwoKICAgICAgICByZ3ggPSBuZXcgUmVnZXgocGF0dGVybik7CiAgICAgICAgcmVzdWx0ID0gcmd4LlJlcGxhY2UoZW1haWwsIHJlcGxhY21lbnQpOwogICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKHJlc3VsdCk7Cgl9Cn0=