title: Regular Expression for AlphaNumeric, Hyphen and Underscore without any space
body: <p>I would like to have a regular expression that checks if the string contains Alphanumerics, Hyphen and Underscore. There should not be any spaces or other special characters other these three. My string will be under either of these 2 patterns.</p>
  
  <ul>
  <li><code>XYZ0123_123456</code></li>
  <li><code>ABCdefGHI-727</code></li>
  </ul>
  
  <p>I have already tried this expression. But it didnt workout. <code>[[a-zA-Z0-9_-]*]</code></p>