connectionString = ConfigurationManager.ConnectionStrings["PMSDBEntities"].ConnectionString;
string regexStr = "connection string=/"(?<key>.*?)/"";
Regex r = new Regex(regexStr, RegexOptions.IgnoreCase);
Match mc = r.Match(connectionString);
connectionString = mc.Groups["key"].Value;