I'm looking for a very simple way to return an array of strings that are contained between trailing and leading strings. Here's an example:
char *text = ;;;Text I want]]] Text I don't care about ;;;More Text I want]]] More text I don't care about
Calling stringBetweenString(";;;","]]]",text)
should return an array (const char *myArray[2]
) with the following values: "Text I want","More Text I want"
.
Unfortunately, I do not have access to RegEx for this application, nor external libraries. Any help would be greatly appreciated, thanks!