0

I have a string like this:

blabla random-string-I-dont-need blabla
SPECIALSTRING
the-string-I-need
STRINGSPECIAL
blabla other-string-I-dont-need blabla
SPECIALSTRING
the-string-I-need
STRINGSPECIAL
//etc, I have a very long file with this 'pattern' repeated

What I need out of this string are the

SPECIALSTRING
the-string-I-need
STRINGSPECIAL

parts as many times it appears in the string - the-string-I-need is always different, but specialstring and stringspecial are always the same - and different from each other.

(Just note, that I can't count on new line characters, I just added them here to give you a better vision.)

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291

0 Answers0