title: JavaScript RegExp issue with lists
body: <p>people!
  I have an issue where I don't know how I can replace my text with ul, li tags.</p>
  <p>Here it is:
  I have such text, for example:</p>
  <pre><code>let text = &quot;Du bist der beste Mensch&quot;;
  </code></pre>
  <p>I need to convert the &quot;der beste Mensch&quot; part into:</p>
  <pre><code>&lt;ul&gt;
   &lt;li&gt;der&lt;li&gt;
   &lt;li&gt;beste&lt;li&gt;
   &lt;li&gt;Mensch&lt;li&gt;
  &lt;/ul&gt;
  </code></pre>
  <p>So the general output should be:</p>
  <p>Du bist</p>
  <ul>
   <li>der<li>
   <li>beste<li>
   <li>Mensch<li>
  </ul>
  <p>I tried to use regular expressions and ended up with:</p>
  <pre><code>text.replace(/(?:^|\n)- (\S+)/g, '&lt;li&gt;$1&lt;/li&gt;');
  </code></pre>
  <p>If I put <code>&lt;ul&gt;&lt;li&gt;$1&lt;/li&gt;&lt;/ul&gt;</code>, it, of course, would give me those words boxed in both ul and li tags which is not what I wanted.</p>