最近在开发过程中犯了一个低级的错误,用正则表达式去操作一个null值数据,此处做个记录,以示警醒
Consol.WriteLine(Regex.Replace(null, pattern, ""));
值不能为 null。
参数名: input
System.Text.RegularExpressions.Regex.Replace(string, string)
System.Text.RegularExpressions.Regex.Replace(string, string, string)