title: Regular Expression to Match Non-Whitespace Characters
body: <p>I need to make a regular expression that matches something like:</p>
  
  <pre><code>JG2144-141/hello
  </code></pre>
  
  <p>or</p>
  
  <pre><code>!
  </code></pre>
  
  <p>but not:</p>
  
  <pre><code>laptop bag
  </code></pre>
  
  <p>or a string consisting of whitespace chars only (<code>' '</code>).</p>
  
  <p>Right now I have <code>[A-Za-z0-9-!/\S]</code>, but it isn't working because it still matches with laptop and bag individually. It shouldn't match laptop bag and the empty string at all.</p>