I would like to clarify your question in order to help you.
Is the “Cat1…” line always immediately above the “Dog1…” line?
If so, set the Use Regualr Expression option, and replace
If not, please figure out the maximum number of lines that exist between the “Cat1…” line and the “Dog1…” line. If it is 10 lines, you can replace:
and also go to the Advanced button in the Replace dialog box, and enter “10” to the “Additional Lines to Search for Regular Expressions” text box.
I hope this helps.