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

阅读 35

2022-08-19


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)

0 0 举报