Unity 判断字符串是否包含特殊字符
/// <summary>
/// // *** 是否包含特殊字符
/// </summary>
public static bool IsSpecialChar(string str)
{
if (string.IsNullOrWhiteSpace(str))
{
return false;
}
Regex regExp =
new Regex("[ \\[ \\] \\^ \\- *×――(^)$%~!@@##$…&%¥—+=<>《》!!???::?`·、。,;,.;/\'\"{}()‘’“”\\r\\n\\t -]");
if (regExp.IsMatch(str)) return true;
return false;
}