title: Invalid RegEx in Nodejs
body: <p>I have a code for CORS configuration in NodeJS. It is as follows:</p>
  
  <pre><code>var allowedOrigin = new RegExp('^https?://(' + config.get('http:allowedOrigins').join('|') + ')(:\\d+)?(/.*)?$');
  </code></pre>
  
  <p>It gives this error to</p>
  
  <pre><code>SyntaxError: Invalid regular expression: /^https?://(*.dev.examplewebsite.com|0.0.0.0|192.168.1.1|.*)(:\d+)?(/.*)?$/: Nothing to repeat
      at new RegExp (native)
      at Object.&lt;anonymous&gt; (/Users/yagiz/Desktop/example/project-api/src/lib/handlers/cors.js:4:21)
  </code></pre>