title: Ignore specific characters in regex
body: <p>I have this method to check if a string contains a special character, but I don't want it to check for specific characters such as (<code>+</code> or <code>-</code>) how would I go about doing this?</p>
  
  <pre><code>public boolean containsSpecialCharacters(String teamName) {     
      Pattern p = Pattern.compile("[^a-z0-9 ]", Pattern.CASE_INSENSITIVE);
      Matcher m = p.matcher(teamName);
  
      boolean b = m.find();
      if (b) {
         return true;
      }
  
      return false;
  }
  </code></pre>