I have a postscript file that has a starting indicator of where I want to begin copying data to a StringBuilder that reads:
$$StartCopy
$$ChunkID[1234]
$$Type[Foo]
\\bla bla for hundreds or thousands of lines
$$EndCopy
$$StartCopy
$$ChunkID[4567]
$$Type[Bar]
\\bla bla for hundreds or thousands of lines
$$EndCopy
$$StartCopy
$$ChunkID[4567]
$$Type[Foo]
\\bla bla for hundreds or thousands of lines
$$EndCopy
$$StartCopy
$$ChunkID[8901]
$$Type[Bar]
\\bla bla for hundreds or thousands of lines
$$EndCopy
Note that there is no specific line that I can start at, nor is there any set number of lines between $$StartCopy and $$EndCopy. In this case, how do I grab the chunk of text $$Chunk[4567]
where $$Type[Bar]
from its start to end line?
To be clear, here is what the end result should be:
$$StartCopy
$$ChunkID[4567]
$$Type[Bar]
\\bla bla for hundreds or thousands of lines
$$EndCopy