title: How do I check if a string contains at least one character from another string?
body: <p>I'm using Java 6.  I have a string that contains "special" characters -- "!@#$%^&amp;*()_".  How do I write a Java expression to check if another string, "password", contains at least one of the characters defined in the first string?  I have</p>
  
  <pre><code>regForm.getPassword().matches(".*[\\~\\!\\@\\#\\$\\%\\^\\&amp;\\*\\(\\)\\_\\+].*")
  </code></pre>
  
  <p>but I don't want to hard-code the special characters, rather load them into a string from a properties file.  So I'm having trouble figuring out how to escape everything properly after I load it from the file.</p>