How would I get all the lines between a line starting with a ">>" and a line that is equal to "!terminate". For example:
>> STARTING.POINT
text1
text2
text3
!terminate
>> STARTING.POINT.TWO
textA
textB
textC
!terminate
How do I convert this text into arrays A and B? Array A should be like this
>> STARTING.POINT
text1
text2
text3
!terminate
And array B should be
>> STARTING.POINT.TWO
textA
textB
textC
!terminate
Note that there can be any amount of strings between these two keywords. There can also be any string following the ">>". Finally, there can be an infinite amount of output arrays, based on the input text. Any help will be very appreciated. :)