in reply to Re^3: Print line before match
in thread Print line before match

Great, works like a charm. Exactly what I was looking for.