Let's say I have this string
[LEVEL]
[NAME]The Girder Guide! [/NAME]
[AUTHOR]draworigami[/AUTHOR]
[AUTHORLEVEL]11[/AUTHORLEVEL]
[COUNTRY]CA[/COUNTRY]
[ID]62784[/ID]
[RATING]4[/RATING]
[DATE]2021-05-11 23:08:35[/DATE]
[PLAYCOUNT]33[/PLAYCOUNT]
[WINCOUNT]28[/WINCOUNT]
[STARS]0[/STARS]
[COMMENTS]1[/COMMENTS]
[/LEVEL]
Is there a way I can get the individual strings between each [] and [/]? I've kept taking shots at it with code from the internet to no avail.
This will return all the text between [] and [/]:
Output:
Edit #1: The original string does not have newlines, so to pretty print: