title: Scala: matching special characters
body: <p>In Scala I need to test if a string has any of the following 'special' characters: <code>!@#\$^%&amp;*()_-\+={}[]|;:"'&lt;,&gt;.?/</code></p>
  
  <p>I can not simply use <code>'nonword'</code> <code>"\\W"</code> regex for this because string may have Cyrillic characters that regex <code>"\\W"</code> matches as well. Trying to use regex:</p>
  
  <pre><code>new Regex("""~`!@#\$^%&amp;*()_-\+={}[]|;:"'&lt;,&gt;.?/""")
  </code></pre>
  
  <p>results in exception:</p>
  
  <pre><code> java.util.regex.PatternSyntaxException: Illegal repetition near index 17 ~`!@#\$^%&amp;*()_-\+={}[]|;:"'&lt;,&gt;.?/
                                                                                             ^
  at java.util.regex.Pattern.error(Pattern.java:1924)
  at java.util.regex.Pattern.closure(Pattern.java:3104)
  at java.util.regex.Pattern.sequence(Pattern.java:2101)
  </code></pre>
  
  <p>Any ideas?</p>