using System.Text.RegularExpressions;
public static void Main()
string _RegexAppRoot = @"href=.+?\$appRoot\$";
var regex = new Regex(_RegexAppRoot);
string prefix = "https://start-stg.pwc.com/start3/";
var x = regex.Replace(@"<link rel=""stylesheet"" href=""~/$appRoot$phoenix/styles/bootstrap.min.css"" type=""text/css"" />", "href=\"" + prefix + (prefix.EndsWith("/") ? string.Empty : "/"));