I need to capture the string ||EPB||
and |TRN|
but only if they appear as a pair.
My text looks like this.
||EPB|| 1-2-3 |TRN| ||EPB||....||EPB|| Other text ||EPB|| 11-2-3 Test A |TRN| more text that may have carriage returns in it ||EPB||nospace/here||EPB|| 12-2-3 |TRN|
I want the results to be:
- 1-2-3
- 11-2-3 Test A
- 12-2-3
The closest I got was
\|\|EPB\|\|(.*?)\|TRN\|
But that doesn't handle the situation where there is more than one ||EPB|| appears before a |TRN|