I have a variable with tags constructed like this:
MYSTRING='TAGS: This is an example <!VARNAME:[ADDLT:%,#:4]!>, lowercase text <!LOWERCASE,,!> and just a <!JUSTAVARIABLE!><!ANOTHERVARIABLE!>`
I would like to get all occurrences (including the tag) but without the other text:
- <!VARNAME:[ADDLT:%,#:4]!>
- <!LOWERCASE,,!>
- <!JUSTAVARIABLE!>
- <!ANOTHERVARIABLE!>
I cannot find a solution using either grep -o or sed. Does anyone have a solution for my problem?