title: Java - How to test if a String contains both letters and numbers
body: <p>I need a regex which will satisfy both conditions.</p>
  <p>It should give me true only when a String contains both A-Z and 0-9.</p>
  <p>Here's what I've tried:</p>
  <blockquote>
  <p><code>if PNo[0].matches(&quot;^[A-Z0-9]+$&quot;) </code></p>
  </blockquote>
  <p>It does not work.</p>