title: JS Split String By Multiple Paired Delimiters
body: <p>I have this string that I split whenever it finds two colons.</p>
  <p>&quot;for exam:ple thi:s string turns into&quot;
  [&quot;for exam&quot;,&quot;pls thi&quot;, &quot;s string turns into&quot;]</p>
  <p>I do this with:</p>
  <pre><code>text.split(/(:.*?:)/g)
  </code></pre>
  <p>Afterward I interpret a string as &quot;inside&quot; the delimiter if it contains the characters I expect and none of those I don't.</p>
  <p>How do I make it also extract another delimiter like $$...$$ as well as the original :...: but also include the delimiter somewhere so I can use different logic for it?</p>
  <p>For context I'm parsing text into different react components.:...: includes addresses to embed a certain component, while $$...$$ includes MathJax.</p>