title: Split string with interpolation marker
body: <p>I'm trying to figure out the best way to split a string matching a regular expression into an array</p>
  
  <p>e.g</p>
  
  <p><strong>Input:</strong></p>
  
  <p><code>[{{ content.id }}] Some {{ content.text }} with expression</code></p>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>[
      '['
      '{{ content.id }}'
      '] Some '
      '{{ content.text }}'
      ' with expression'
  ]
  </code></pre>
  
  <p>I've tried something like</p>
  
  <pre><code>const r = /{{ *(.+) *}}*/g
  const v = '[{{ content.id }}] Some {{ content.text }} with expression'
  
  v.split(r)
  </code></pre>
  
  <p>but it's not working as it removes the delimiter.</p>