I have this text:
<ITEM>PART 23 <span class='sub'>m1</span>,
<ITEM>PART 49b
;
I want the output to be:
<b>PART 23 </b><span class='sub'>m1</span>, <b>PART 49b</b>;
I'm using this pattern: <ITEM>(.*?)(?=<|\n|$)
Which results in this:
<b>PART 23 </b><span class='sub'>m1</span>,
<b>PART 49b</b>
;
(notice the semi-colon)
If I change the pattern to this: <ITEM>(.*?)(<|\n|$)
The output will be this:
<b>PART 23 </b>span class='sub'>m1</span>,
<b>PART 49b</b>;
(notice the missing <
in the span
>
What am I missing?