with open(infile) as fd:
    processing = False
txt = None
euro = None
for line in fd:
    if line.strip() == 'AAAA':
        processing = True
txt = ''
euro = False
if processing:
    txt += line
if '\xe2\x82\xac' in line:
    euro = True
if line.strip() == 'FF':
    processing = False
if euro:
    pass
Manipulate txt searching for three pattern (sed,awk,pcregrep)