0
点赞
收藏
分享

微信扫一扫

正则表达式:搜索匹配的sql

晚安大世界 2022-08-19 阅读 34


using System.Text.RegularExpressions;

private bool RegexMatch(string sSource, string sRegexFormat)
{
Regex reg = new Regex(sRegexFormat,RegexOptions.IgnoreCase);
try
{
if (reg.IsMatch(sSource))
{
return true;
}
else
{
return false;
}
}
catch (Exception ex)
{
return false;
}
}


RegexMatch(stringSource, "Mbr_Elig_Term_Date IS NULL")


RegexMatch(stringSource, "ISNULL\(.*MBR_ELIG_TERM_DATE.*\)")


RegexMatch(stringSource, "ISNULL\(.{0,10}MBR_ELIG_TERM_DATE.{0,10}\)")


RegexMatch(stringSource, "ISNULL\(.{0,20}[.[]MBR_ELIG_TERM_DATE.{0,10}\)")


举报

相关推荐

0 条评论