title: How can detect one string contain one of several characters using java regex
body: <p>I have a variable length string, I just want to detect whether this string contains several characters. For example:</p>
  
  <pre><code>"sadsdd$sss^dee~"
  </code></pre>
  
  <p>I want to detect whether this string contains ANY of the following: <code>$</code> <code>^</code> <code>~</code>. How can I do that using Java <code>string.matches</code>?</p>
  
  <pre><code>"sadsdd$sss^dee~".matches("[^+$+~+]");
  </code></pre>