I try to print out the lines between two different patterns(including the patterns) which may accure multiple times in a file. The second pattern may accure besides the startpattern-endpattern-rhytm.
XYZ XYY BBB XYX AAA AAB BBB XYW AAA AAC AAD BBB
-Output should be like:
AAA AAB BBB AAA AAC AAD BBB
I've already tried things like