s1.addVariable("file","/FCK_upload/url")取出内容中所有匹配  s1.addVariable("file","/FCK_upload/url"),取出其中的url在线等。

解决方案 »

  1.   

    Match m = Regex.Match(@"s1.addVariable(""file"",""/FCK_upload/url"")",
        @"(?<=addVariable\(""file"",""/FCK_upload/)[^""]+");
    MessageBox.Show(m.Value);
      

  2.   

    string text=@"s1.addVariable(""file"",""/FCK_upload/url"")";
    MatchCollection mc = Regex.Matches(text, @"(?i)s1.addVariable\(""file"",""/FCK_upload/(?<url>[^""]+)""\)");
    foreach (Match ma in mc)
    {
       Console.WriteLine(ma.Value);
       Console.WriteLine(ma.Groups["url"].Value);
    }