pats_marks = ('^A:(.*)$', 'FOO'), ('^B:(.*)$', 'BAR')
for line in lines:
    mo, m = next(((mo, m) for p, m in pats_mark for mo in [re.match(p, line
        )] if mo), (None, None))
if mo:
    print('%s: %s' % (m, mo.group(1)))
else:
    print('NO MATCH: %s' % line)
Python comparing string against several regular expressions