data = open('file').read().split('}')
for item in data:
    item = [i.strip() for i in item.split('\n') if i != '']
for elem in item:
    if 'hardware ethernet' in elem:
        print(elem.split()[-1])
if item:
    pass
python multiline regex