Hi, The following code is visual basic, .NET, ASP... all of the above? Can anybody tell me what these two "Regex.Replace" functions/methods will leave me with when "strCookies" is equal to the block of text below the two Regex.Replace functions? I believe the idea is simply to capture the "sessionid" code and then the "cadata" code with or without the title/key of "sessionid" and "cadata". Ultimatly I'm trying to do the equivelent in php...the problem is I'm trying to deduce what I need to actually have exactly in the end based on this code. Hope that makes sense. Thanks! (I also wanted to add that for the "cadata" code, I'm specifically confused as to whether I'm suppose to be grabbing the double quotes surrounding the whole code. The sessionid doesn't have and double quotes so it's less confusing. I can't tell what the Regex.Replace function is doing).
Dim strCADataCookie As String = Regex.Replace(strCookies, "(.)sessionid=(.)(,|;)(.*)", "$2")
Dim strSessionIDCookie As String = Regex.Replace(strCookies, "(.)cadata=""(.)""(.*)", "$2")
Netscape HTTP Cookie File http://www.netscape.com/newsref/std/cookie_spec.html This file was generated by libcurl! Edit at your own risk.
a.test.edu FALSE / FALSE 0 sessionid ca391d4e-69ad-4726-b00c-efa26f3d1594
a.test.edu FALSE / TRUE 0 cadata "2YUj33BRih9xeQqCL1PLAY+0EExSdDkGJdQg7KoUbca6OQxrgJi0AuuPBOEhCu7wlG2+2in5ilEE="