sql防注入正则

using System.Text.RegularExpressions;

arg="abc and";
str_Regex = ".*(=|and|exec|insert|select|delete|update|count|chr|mid|master|truncate|char|declare).*"

if (Regex.Matches(arg,str_Regex).Count > 0)
                        return false;

你可能感兴趣的:(sql防注入正则)