• $1应该就是引用了这个组,不用这个会匹配不到

/// <summary>
/// 截取
/// </summary>
/// <param name="n">输入截取数字如-0.3412</param>
/// <param name="t">截取位数</param>
/// <returns></returns>
private double Floor(double n, double t)
{
var i = "^([-+]?[0-9]*.[0-9]{" + t + "})[0-9]*$";
string sRestult = Regex.Replace(n.ToString(), i, "$1");
return System.Convert.ToDouble(sRestult);
}

https://www.cnblogs.com/xinjianheyi/p/5791360.html

https://www.cnblogs.com/wangchuang/p/4271809.html

https://www.cnblogs.com/testsec/p/6095529.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-01-06
相关资源
相似解决方案