"[-|;|,|\/|\(|\)|\[|\]|\}\|\{|%|@|\*|!|\']" public bool IsSafeStr(string str) { return !Regex.IsMatch(str, @"[-|;|,|\/|\(|\)|\[|\]|\}\|\{|%|@|\*|!|\']"); }