in reply to Regular expression help Needed

It seems like malformed data is breeding a malformed question here. If it is to be assumed that you truly want to find thing between BPR and TRN identifiers, then your desired output should be

<b>PE12.3AZ234anything, BPR set ? & @
and
*

which doesn't seem logical, which brings me to my original statement, malformed data breeds a malformed question. what kind of data is this and who's generating it? (If you're at liberty to say that is

The regex however looks like the one above + minimal matchingm{BPR(.*)?TRN}


Grygonos