前面是   tfd10*tdsdfs  
差不多就是这个样子 怎么取出那两个数字      数字 的大小不定哦

解决方案 »

  1.   

    public static string DropString(string inputData)
            {
                string reg = @"[0-9]";
                MatchCollection matchs = Regex.Matches(inputData, reg);
                string str = "";
                for (int i = 0; i < matchs.Count; i++)
                {
                    str += matchs[i].Value;
                }
                return str;
            }
      

  2.   

    如果木有什么特别规则 直接这样就可以了
    Regex.Match(" tfd10*tdsdfs","\\d+").Value
      

  3.   

    string str = "tfd10*tdsdfs";
    Response.Write(str.Substring(3, 2).ToString());