   6222600220001001538=4912120176399092    996222600220001001538=1561560500050008073013000000010000000000===0399092176                                000056451255我获取的一段字符串是这样的,里面有乱码,是编译不过来的
我想获取里面的所有怎么弄,用什么样的正则可以实现6222600220001001538,4912120176399092,996222600220001001538,1561560500050008073013000000010000000000 0399092176,000056451255
这是我要的结果

解决方案 »

  1.   

    string str = "6222600220001001538=4912120176399092    996222600220001001538=1561560500050008073013000000010000000000===0399092176                                000056451255 ";
            string patternstr = @"\d+";
            MatchCollection mc = Regex.Matches(str, patternstr);
            for (int i = 0; i < mc.Count; i++)
            {
                Response.Write(mc[i].Value+",");
            }
    结果:6222600220001001538,4912120176399092,996222600220001001538,1561560500050008073013000000010000000000,0399092176,000056451255,