title: Javascript (node.js) Specific Random String Builder
body: <p>I'm looking for an efficient way to build a random string that has specific requirements but can vary in length. It <strong>must</strong>:</p>
  
  <ul>
  <li>Contain at least one uppercase character.</li>
  <li>Contain at least one lowercase character.</li>
  <li>Contain at least one number.</li>
  <li>Contain at least one of the special characters:
  _-|@.,?/!~#$%^&amp;*(){}[]+=</li>
  </ul>
  
  <p>The random string doesn't have to be unique but if it is, its better. It will be used in a node.js server so any crypto library can be made use of. I saw <code>Math.random().toString(36)</code> which comes close but doesn't get me everything. I'm not sure if I should just try to build a regex for this.</p>