Complex find/replace with PowerShell
===

I would like to add html links in the following examples:

 1. Blah Blah Blah BZ#01234 Blah Blah Blah
 2. Blah Blah Blah BZ#0124 Blah Blah Blah
 3. Blah Blah Blah BZ 012345 Blah Blah Blah
 4. Blah Complex Blah BZ#123 , 345, 567,2341 Blah

So the look like:

 1. Blah Blah Blah &lt;a href="http://bz.com/show_bug.cgi?id=01234"&gt;BZ#01234&lt;/a&gt; Blah Blah Blah
 2. Blah Blah Blah &lt;a href="http://bz.com/show_bug.cgi?id=0124"&gt;BZ#0124&lt;/a&gt; Blah Blah Blah
 3. Blah Blah Blah &lt;a href="http://bz.com/show_bug.cgi?id=012345"&gt;BZ 012345&lt;/a&gt; Blah Blah Blah
 4. Blah Complex Blah &lt;a href="http://bz.com/show_bug.cgi?id=123"&gt;BZ#123&lt;/a&gt; , &lt;a href="http://bz.com/show_bug.cgi?id=345"&gt;345&lt;/a&gt;, &lt;a href="http://bz.com/show_bug.cgi?id=567"&gt;567&lt;/a&gt;,&lt;a href="http://bz.com/show_bug.cgi?id=2341"&gt;2341&lt;/a&gt; Blah


So I guess this is a regex job to find the matches, and some PowerShell magic to add the html links. I *think* the regex is `((BZ#)|(BZ ))[0-9]+` to match everything except the complex example, but I dont know regex well enough to be sure, or how to even test it in PowerShell.