I’m trying to write a regular expression for this.
I need it to grab the 9 digit number that’s in brackets provided a ‘6 /Helvetica-Bold f’ has appeared before it but not a ‘6 /Helvetica f’
6 /Helvetica-Bold f
6 /Helvetica
<-- any number of lines of other text -->
261 632 m(436243874)r 1 9 0 Endline <--- this would not match
6 /Helvetica-Bold f
<-- any number of lines of other text -->
261 632 m(436243874)r 1 9 0 Endline <--- this would match
I found that this – “6 /Helvetica-Bold[\s\S]+((\d\d\d\d\d\d\d\d\d))” was no good as it would match for both cases as shown above.
Can anyone help it’s driving me nuts?
should work. (Re-edited to fit to edited example)
Explanation: