Hi, I have a foreach statement that parses data. I have a string in it but I want to use it outside of the foreach loop. How do I do it?

Heres my code:

Code:
   System.Text.RegularExpressions.Regex r = new System.Text.RegularExpressions.Regex("<input name=\"authenticity_token\" type=\"hidden\" value=\".*\" />");
                    MatchCollection matches = r.Matches(accountstatus);
                    foreach (Match itemcode in matches)
                    {


                      string autcode = UrlEncode((itemcode.Value.Split('\"').GetValue(5)));
                    }
I want to use autcode string out of the foreach loop. Can you help?