1、

  public static String RemoveSpecialCharacter(String hexData)
  {
      return Regex.Replace(hexData, "[ \r \n \t \\[ \\] \\^ \\-_*×――(^)$%~!@#$…&%¥—+=<>《》!!???::•`·、。,;,.;\"‘’“”-]", "").ToUpper();
  }

 

点到为止