Struggling to extract words between 2 static words with regex


im struggling to get all words between the headers Cross Reference and Domestic Booking (the first one). with the regex ill use i fetch everything between the header Cross reference and the second header named Domestic Booking.

this is the regex ill use
(?>=Cross Reference).* (?=Domestic Booking)

This is the string that i want manipulate.

Cross Reference
526-12H00101-RST-01 Serial: 11 - 16 FATHER

Domestic Booking:
Port of Entry is Final Destination

Error: Subreport could not be shown.

Domestic Booking:

Thanks in advance

the * stops on line end

have a look here:


Thank you ppr,

The Ungreedy version works.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.