Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
(\1)?b)$/。有关更多信息,请参见。@Jack,说得好!那么,ANSI SQL SELECT的C#regex是什么呢? select * from non_existant_table; select * frm non_existant_tabl_Sql_Regex_Unit Testing - Fatal编程技术网

(\1)?b)$/。有关更多信息,请参见。@Jack,说得好!那么,ANSI SQL SELECT的C#regex是什么呢? select * from non_existant_table; select * frm non_existant_tabl

(\1)?b)$/。有关更多信息,请参见。@Jack,说得好!那么,ANSI SQL SELECT的C#regex是什么呢? select * from non_existant_table; select * frm non_existant_tabl,sql,regex,unit-testing,Sql,Regex,Unit Testing,(\1)?b)$/。有关更多信息,请参见。@Jack,说得好!那么,ANSI SQL SELECT的C#regex是什么呢? select * from non_existant_table; select * frm non_existant_table; public bool IsValid(string sql) { string pattern = @"SELECT\s.*FROM\s.*WHERE\s.*"; Regex rgx = new Regex(pattern, Rege


(\1)?b)$/。有关更多信息,请参见。@Jack,说得好!那么,ANSI SQL SELECT的C#regex是什么呢?
select * from non_existant_table;
select * frm non_existant_table;
public bool IsValid(string sql)
{
string pattern = @"SELECT\s.*FROM\s.*WHERE\s.*";
Regex rgx = new Regex(pattern, RegexOptions.IgnoreCase);
return rgx.IsMatch(sql);
}