var flashvars = {
"client.allow.cross.domain" : "0",
"client.notify.cross.domain" : "1",
};
По какой-то странной причине не не хочет анализироваться с этим кодом (в C #).
private void parseVariables() {
String page;
Regex flashVars = new Regex("var flashvars = {(.*?)}", RegexOptions.Multiline | RegexOptions.IgnoreCase);
Regex var = new Regex(@"""(.*?)"",", RegexOptions.Multiline | RegexOptions.IgnoreCase);
Match flashVarsMatch;
MatchCollection matches;
String vars = "";
if (!IsLoggedIn)
{
throw new NotLoggedInException();
}
page = Request(URL_CLIENT);
flashVarsMatch = flashVars.Match(page);
matches = var.Matches(flashVarsMatch.Groups[1].Value);
if (matches.Count > 0)
{
foreach (Match item in matches)
{
vars += item.Groups[1].Value.Replace("\" : \"", "=") + "&";
}
}
}