Im trying to match everything for the E) "column".
A1147/13 NOTAMN
Q) ESAA/QRRCH/IV/BO /AW/000/023/5933N01746E002
A) ESSA B) 1311140900 C) 1311211500
D) 14 21 0900-1500
E) UPPER LIMIT ES R16C KUNGSANGEN RAISED TO 2300 FT AMSL
REF AIP ENR 5.1
F) GND G) 2300FT AMSL
CREATED: 30 Oct 2013 10:00:00
SOURCE: EUECYIYN
Using the following regex:
preg_match_all('/E\)(.*)(?=F\))/is', $string, $output);
I have managed to get the data, but only as long as the F) column exists, which it doesnt always do. Sometimes it ends just like:
A1147/13 NOTAMN
Q) ESAA/QRRCH/IV/BO /AW/000/023/5933N01746E002
A) ESSA B) 1311140900 C) 1311211500
D) 14 21 0900-1500
E) UPPER LIMIT ES R16C KUNGSANGEN RAISED TO 2300 FT AMSL
REF AIP ENR 5.1
CREATED: 30 Oct 2013 10:00:00
SOURCE: EUECYIYN
How to solve this?
Edit: This is the part that i want to return:
UPPER LIMIT ES R16C KUNGSANGEN RAISED TO 2300 FT AMSL
REF AIP ENR 5.1
It will either end with the start of column F) or the text CREATED.