using System;
using System.Text .RegularExpressions ;
public class Test
{
public static void Main( )
{
string str = @"....href=" "http://m...content-available-to-author-only...r.com" " href=" "www.foo.mynewsite.humbler.com" " foo bar href=" "http://m...content-available-to-author-only...e.com" " " ;
string result = Regex.Replace ( str, @"(?<=(https?://)?(www\.)?(\S+?\.)?mynewsite(\.\S+?)?)\.com" , ".net" ) ;
Console.WriteLine ( result) ;
Console.ReadLine ( ) ;
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CiAKcHVibGljIGNsYXNzIFRlc3QKewpwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCnsKc3RyaW5nIHN0ciA9IEAiLi4uLmhyZWY9IiJodHRwOi8vbS4uLmNvbnRlbnQtYXZhaWxhYmxlLXRvLWF1dGhvci1vbmx5Li4uci5jb20iIiBocmVmPSIid3d3LmZvby5teW5ld3NpdGUuaHVtYmxlci5jb20iIiBmb28gYmFyIGhyZWY9IiJodHRwOi8vbS4uLmNvbnRlbnQtYXZhaWxhYmxlLXRvLWF1dGhvci1vbmx5Li4uZS5jb20iIiAiOwpzdHJpbmcgcmVzdWx0ID0gUmVnZXguUmVwbGFjZShzdHIsIEAiKD88PShodHRwcz86Ly8pPyh3d3dcLik/KFxTKz9cLik/bXluZXdzaXRlKFwuXFMrPyk/KVwuY29tIiwgIi5uZXQiKTsKQ29uc29sZS5Xcml0ZUxpbmUocmVzdWx0KTsKQ29uc29sZS5SZWFkTGluZSgpOwp9Cn0=