I have a block of text in the following format:
FARE CALC INDICATOR: 9
PHL US CUN264.00AA MIA102.00AA PHL88.37NUC454.37END ROE1.00 US
XT34.40US5.00XA5.00AY 23.20UK28.14XD9.00XFPHL4.5 MIA4.5
**FARE BREAKDOWN/FOP/TOUR CODE**
Using Javascript and regex, I need to match this section:
PHL US CUN264.00AA MIA102.00AA PHL88.37NUC454.37END ROE1.00 US XT34.40US5.00XA5.00AY 23.20UK28.14XD9.00XFPHL4.5 MIA4.5
Basically I need to find the next line break after FARE CALC INDICATOR:
and return all the text between that point and **FARE BREAKDOWN/FOP/TOUR CODE**
I tried .match(/FARE CALC INDICATOR:([\s\S]+)\*\*FARE BREAKDOWN\/FOP\/TOUR CODE\*\*/)
This almost works but, if there is any text between FARE CALC INDICATOR:
and the next new line (like the number 9
in this example) that text gets captured also and should not.
The number 9
in this example could potentially be any character and is not limited to one character