i'm looking for most efficient method of lifting text between certain SWIFT tags.
My string contains the following
:59:/SOMETEXT
MORETEXT
EVEN MORE TET
:71A:/some other text
So in the example above, i need to store all text lines between :59: and :70: however, tag :59: can also be represent as follows:
:59a:/SOMETEXT
MORETEXT
EVEN MORE TET
:71A:/some other text
I was thinking of looping through each and saving current tag and previous tag, and then checking if the previous tag was 71A, but there could be further 'Optional' tags in-between tag 59a and tag 71a
Any suggestions on how to handle this?