title: Check domain is valid Node.js
body: <p>In Node.js, how can I check if a domain issued by the user is possible and contains allowed characters only?</p>
  
  <p>I do not want to check if the actual domain is existent, only that it is  syntactically correct.</p>
  
  <p>Eg. something.something.something should be allowed, where "*)()-.net shouldn't.</p>
  
  <p>I have tried to use some of the regexs on the question <a href="https://stackoverflow.com/questions/1755144/how-to-validate-domain-name-in-php">How to validate domain name in PHP?</a> however, I'm actually unsure of how to use these in node. They seemed to always come out false.</p>