Based on what you've given me this is what I would do.
If that is one string, I would split the cookie lines by "\r\n"
Escaped result for your string:
"G_ENABLED_IDPS=google\r\n\tcto_lwid=8a611433-fd26-4930-9a5d-d4287cf0d2d9\r\n\tnotice_preferences=2:\r\n\tnotice_gdpr_prefs=0,1,2:\r\n\t__stripe_mid=c4469ee0-02ec-496b-a40d-73531016c3a1\r\n\t__stripe_sid=6fad41df-b2df-42bd-8e1d-0102b6db1f7f\r\n\t_xsrf=2|052be4b4|bf48338576f4ad3f0ca5bd16e7293b49|1547583634\r\n\tbsid=d4fecffc928e4bbe8e3f03ec6ee06646\r\n\t_timezone=1\r\n\tSLG_GWPT_Show_Hide_tmp=1\r\n\tSLG_wptGlobTipTmp=1"
I would rather deal with lists instead of arrays so I just do .ToList();
This is one way to do it, I'm sure it could be simplified using LINQ.
public static List<Cookie> ParseStringToCookie(string cookieString)
{
var cookies = new List<Cookie>();
// FYI: \r = return | \n = new line | \t = tab
var cookieStringList = cookieString.Split("\r\n\t").ToList(); //Split \r\n\t because I copied from thread, yours might be different
foreach (var c in cookieStringList)
{
var cookieNameValues = c.Split('=');
cookies.Add(new Cookie(cookieNameValues[0], cookieNameValues[1]));
}
return cookies;
}
Then if you need it in a CookieContainer just add each cookie to it. If you just need the value do, var cookie = cookies.FirstOrDefault(m=>m.Name == "cookieNameYouWant");