匹配n位或以上的小数这个n是参数,由我在程序中动态指定
我这样写总是不对string matchPattern = string.Format(@"^\-?[\d]+(.[\d]{{n},})?$",n);