There are a lot of ways to extract text from between two strings, but what if those strings occur multiple times and you only want the text from the first two strings? I can't seem to find anything to work here. I'm using sed to process the text after it's extracted, so I prefer a sed answer, but whatever works is fine with me.
It's an xml file, the text is between string tags (hope that doesn't cause any confusion). The text may be 1 or 100 lines long and may also contain whitespace, linebreaks, indentions, etc, which shouldn't matter much, but the location of the tags may seem fairly random in relation to the actual text and not a clean "^tagTEXTtag$". I want everything, whitespace, blank lines, etc, between the first open and close tags.
<string>This is
the text
that I want
</string>
<string>text I don't want</string>
<string>more text
I don't want</string>