Here is my text file:
YN FILE=“stop.x" DATE=wwepweijfp Life=spfewff FUIL=“keener” CREATED_BY=“xxxxx”
DY FD=4344334 HSH=OIHF
DC A_GN=EFEFOK
DF EFIIEFNFNEE
DF NIFENPEFEF
DF AO EIJHEPFN A0 pjwdwdwd
DF C0 STATICVECTOR
ZZ ---------------< Fields >---------------------
DF A0 VERN FMGL ROJF AO
GS MOB40 99
GA 4 Y 3 F 00H00M F
G2 “eiberbnier " EE
C0 D56916E65D4500574124B15AD3226746A7F70AD7A3936A550BDB87FC077E9F4C7D36C4E9BFFA7545C4AE8C4173
A0 VDS1000170 34486EF018B1BF89 955486C529989CBC 89BCE463 919BC6E9 C927D0 09BA5356CD7CFFBD
A0 VDS1000171 1951420D5909073A FF7B6A08E2BDC4AC E9593876 50ABACB9 894A6E 57AA4A23DE6414E0
I would like to extract this block :
The first line of the text always starts with a YN FILE. I want to extract everything until it comes across a new line beginning with A0.
I have tried such :
matchObjj = re.search(r'YN.*\nC0.*\nA0', data, re.DOTALL)
But it also extracts the other A0 beginning in newline.
