I decided to make a new thread and ask a much simpler (hopefully) question.
Lets say i had a text file that contained
mouse
cat
cat
cat
dog
mouse
dog
dog
mouse
cat
mouse
and i wanted it to search for “dog” and once found i would want it to delete all the lines above dog until it see’s cat… as well as delete everything below dog until it see’s cat as well…
so the result would be
mouse
cat
cat
cat
cat
mouse