title: Invalid regular expression range out of order in character class
body: <p>When running an Angular application, I get this error:</p>
  
  <blockquote>
    <p>Invalid regular expression: /[^ áš€á Žâ€€-â€Š â€¯âŸã€€]/: Range out of order in character class</p>
  </blockquote>
  
  <p>The (minified) line of code causing the error is:</p>
  
  <pre><code>/**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */var ec="ngPreserveWhitespaces",tc=new Set(["pre","template","textarea","script","style"]),nc=" \f\n\r\t\váš€á Žâ€€-â€Š\u2028\u2029â€¯âŸã€€\ufeff",rc=new RegExp("[^"+nc+"]"),ic=n.....
  </code></pre>
  
  <p>This code is coming from Angular, so why does it cause a runtime error?</p>
  
  <p>Note: using Angular 6.0</p>