using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Text; using System.Text.RegularExpressions; namespace BBWY.Client.Extensions { public static class StringExtensions { public static bool IsSpecialChar(this string str) { Regex regExp = new Regex("[ \\[ \\] \\^ \\-_*×――(^)$%~!@@##$…&%¥—+=<>《》!!???::•`·、。,;,.;/\'\"{}()‘’“”-]"); if (regExp.IsMatch(str)) { return true; } return false; } } }