你已经得到strArray了,
List<int[]> intList = new List<int[]>;
foreach (string s in strArray)
{
Matches MatchColl = Regex(s,@"(?<content>/d+)");
if (MatchColl.Length>0)
{
int[] intArray = new int[MatchColl.Length];
int i = 0;
foreach (Match m in MatchColl)
{
intArray[i] = int.Parse(m.Groups["content"].Value);
i++;
}
intList.Add(intArray);
}
}时间仓促,没有测试过,你可以试试看。

解决方案 »

  1.   

    你给的这个程序有问题啊~~~~
    List<int[]> intList = new List<int[]>;
    不能这样用的~~~~
    我看用ArrayList还行~
      

  2.   

    private IPAddress GetLocalHost()
            {
                try
                {
                    WebClient wClient = new WebClient();
                    byte[] byteRecv = wClient.DownloadData("http://www.ip138.com/");
                    string strRecv = Encoding.GetEncoding("GB2312").GetString(byteRecv);
                    string pattern = @"(((\d{1,2})|(1\d{2})|(2[0-4]\d)|(25[0-5]))\.){3}((\d{1,2})|(1\d{2})|(2[0-4]\d)|(25[0-5]))";  
                    string localHost = Regex.Match(strRecv, pattern).ToString();
                    return IPAddress.Parse(localHost);
                }
                catch (Exception exx)
                {
                    System.Diagnostics.Trace.WriteLine("Exception Occured while Running GetLocalHost-->\r\n" + exx.Message);
                    return IPAddress.Parse("127.0.0.1");
                }
            }        private string[] FormatInput(string filePath)
            {
                List<string> ret = new List<string>();            try
                {
                    using (StreamReader reader = new StreamReader(filePath))
                    {
                        while (reader.Peek() != -1)
                        {
                            string aLine = reader.ReadLine();
                            if (!aLine.StartsWith("//"))
                            {
                                aLine = aLine.Replace(",", "   ");
                                ret.Add(aLine);
                            }
                        }
                    }
                }
                catch (Exception exx)
                {
                    System.Diagnostics.Trace.WriteLine("==========Exception Occured==========\r\n" + exx.Message);
                }            return ret.ToArray();
            }
      

  3.   

    sorry, 发多了一个没用的东东, 汗汗...GetLocalHost不用理会, 看FormatInput就行
      

  4.   

    virgoboy2004() ( ) 信誉:100  2007-8-10 20:07:31  得分: 0   
       
    你给的这个程序有问题啊~~~~
    List<int[]> intList = new List<int[]>;
    不能这样用的~~~~
    我看用ArrayList还行~
    =======================================================List<T>是在.NET 2.0新增的,Namespace是System.Collections.Generic
      

  5.   

    Matches MatchColl = Regex(s,@"(?<content>/d+)");
    这句什么干什么的啊~~
    是不是就是=strArray = strLine.Split(charArray,StringSplitOptions.RemoveEmptyEntries);
    nameplace是哪个啊?