using System.Text.RegularExpressions;
namespace ET
{
public static class StringCheckHelper
{
private const string _checkName = @"^[一-龥a-zA-Z0-9]+$";
public static bool IsName(string input)
{
var isMatch = Regex.IsMatch(input, _checkName);
return isMatch;
}
private const string _checkDesc = @"^[一-龥a-zA-Z0-9,,。.!!]+$";
public static bool IsDesc(string input)
{
var isMatch = Regex.IsMatch(input, _checkDesc);
return isMatch;
}
}
}
最后修改:2025 年 04 月 14 日
© 允许规范转载