[Solved] Assist me in translating Visual Basic regex to C#? [closed]


Does this work properly for you?

System.Text.RegularExpressions.Regex r = new System.Text.RegularExpressions.Regex("<input name=\"authenticity_token\" type=\"hidden\" value=\".*\" />");
MatchCollection matches = r.Matches(theusercp);
foreach (Match itemcode in matches) {
    autcode = UrlEncode((itemcode.Value.Split('\"').GetValue(5)));
}

Perhaps you’ll also have to write var autcode and/or Server.UrlEncode.

8

solved Assist me in translating Visual Basic regex to C#? [closed]