title: Convert Javascript regular expression to Java syntax
body: <p>I am aware that regEx are common across languages...But I am having trouble in writing the Java syntax.
  I have a regular expression coded in JS as;</p>
  
  <pre><code>if((/[a-zA-Z]/).test(str) &amp;&amp; (/[0-9]|[\x21-\x2F|\x3A-\x40|\x5B-\x60|\x7B-\x7E]/).test(str))         
  return true;
  </code></pre>
  
  <p>How do I write the same in Java ?</p>
  
  <p>I have imported</p>
  
  <pre><code>import java.util.regex.Matcher;
  import java.util.regex.Pattern;
  </code></pre>
  
  <p>Just to add, from what I am trying it is saying \x is an invalid escape character..</p>