title: How to restrict more than one whitespace in Java Regex?
body: <p>A validation to be developed for a JavaFX text field where single whitespace is allowed but more than one whitespace is not be allowed. </p>
  
  <blockquote>
    <p>For example,  "Apple Juice" -- correct "Apple  Juice" -- incorrect
    should be restricted</p>
  </blockquote>
  
  <pre><code>if (title.matches("[a-zA-Z0-9 ]+"))
  </code></pre>
  
  <p>Found couple of links but not meeting my requirement. I believe that it is more of a logical tweak.</p>
  
  <p><a href="https://stackoverflow.com/questions/4731055/whitespace-matching-regex-java">Whitespace Matching Regex - Java</a></p>
  
  <p><a href="https://stackoverflow.com/questions/5601754/regex-allowing-a-space-character-in-java">Regex allowing a space character in Java</a></p>