So I have this one string, which contains multiple occurrences of a substring. All of these strings have the following format: <c@=someText>Content<c>
Example:
This combination of plain text and <c=@flavor> colored text<c> is valid. <c=@warning>Multiple tags are also valid.<c>
I want to extract each of the substrings via regex. However if I use the following regex <c=@.+?(?=>)>.*<c>
It matches everything from the first <c...
to the last <c>
. What I want is each of those substrings as one item. How can I do this and if I can't do it with regex, what would be the best way to achieve my goal.