Notepad++ regular expressions: Matching multiple segments separated by token
<p>For many years, I used a very handy trick in Notepad++ and SciTE which allowed me to split a given string up by a token.  For example, given this input:</p>

<pre><code>first name|last name
bob|johansen
scarlet|scarnetti
nelson|huguemeyer
</code></pre>

<p>I could then execute a regular expression to turn it into an HTML table.  The search string would be:</p>

<pre><code>(.+)|(.+)
</code></pre>

<p>And the replace string would be:</p>

<pre><code>&lt;tr&gt;&lt;td&gt;\1&lt;/td&gt;&lt;td&gt;\2&lt;/td&gt;&lt;/tr&gt;
</code></pre>

<p>The end result would be:</p>

<pre><code>&lt;tr&gt;&lt;td&gt;first name&lt;/td&gt;&lt;td&gt;last name&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;bob&lt;/td&gt;&lt;td&gt;johansen&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;scarlet&lt;/td&gt;&lt;td&gt;scarnetti&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;nelson&lt;/td&gt;&lt;td&gt;huguemeyer&lt;/td&gt;&lt;/tr&gt;
</code></pre>

<p>When I have spreadsheets that are hundreds of lines long and need to be converted into HTML format, this was extremely useful!</p>

<p>Unfortunately, in recent versions it appears that the regular expression engine has changed such that my search pattern above no longer works.  The first occurrence of <code>(.+)</code> matches everything from the beginning of the line to the end of the line, ignoring the intervening <code>|</code> characters.</p>

<p>I've flailed helplessly through a variety of different search patterns trying to find one that will get everything up to the first <code>|</code>, then everything after it.  In longer examples, there might be five or six different segments separated by <code>|</code> characters.</p>

<p>So far, my efforts have failed.  What do I need to do to split a line of input at specific tokens via regular expressions in Notepad++?</p>