title: Invalid regular expression - Google Chrome only
body: <p>I have this regular expression to validate a username:</p>
  
  <pre><code>/^(?=.{5,20}$)(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._]+(?&lt;![_.])$/
  </code></pre>
  
  <p>It works in IE, Firefox and Safari browsers, but in Chrome there is a javascript error thrown on invoking the validation.</p>
  
  <blockquote>
    <p>Uncaught SyntaxError: Invalid regular expression: /^(?=.{5,20}$)(?![<em>.])(?!.*[</em>.]{2})[a-zA-Z0-9.]+(?.])$/: Invalid group</p>
  </blockquote>
  
  <p>I have used Expresso and regex101.com to confirm that it is a syntactically correct regex.</p>
  
  <p>How do I go about finding the problem?</p>