title: Vue2: Invalid regular expression flag
body: <p>I have a Vue view that loads some html and extracts the body-tag content from it.
  Vue return the following error:</p>
  
  <blockquote>
    <p>./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&amp;index=0!./src/views/Inbox.vue
    Module parse failed: Invalid regular expression flag (170:43) You may
    need an appropriate loader to handle this file type.</p>
  </blockquote>
  
  <p>My regex looks ok: I tested it here:</p>
  
  <p><a href="https://regex101.com/r/noPGfP/1" rel="nofollow noreferrer">https://regex101.com/r/noPGfP/1</a></p>
  
  <p>This is my (simplified) code:</p>
  
  <pre><code>export default {
      name: "inbox",
      methods: {
          load(rs) {
              _Api._get('load', {id: rs["uuid"]}).then((response) =&gt; {
                  if(response.status==200 &amp;&amp; response.statusText=="OK") {
                      var html = response.body;
                      var body = html.match(/\&lt;body[^\&gt;]*\&gt;(.*)\&lt;\/body\&gt;/si);
                  }
              });
          }
      },
  };
  </code></pre>