title: Regex replace multiple non empty lines
body: <p>So I need to read a js file as string and replace whatever inside [] with other data.</p>
  <p>Original</p>
  <pre><code>const array = [
     'text_a',
     'text_b',
  ];
  </code></pre>
  <p>And the output needs to be</p>
  <pre><code>const array = [
     'replacing_text_a',
     'replacing_text_b',
     'replacing_text_c',
  ];
  </code></pre>
  <p>I tried multiple things and the closest I got was</p>
  <p><code>const[ ]{0,}array[ ]{0,}=[ ]{0,}\[([\s\S]{0,})];</code></p>
  <p>but I get <code>Unmatched ')'</code></p>