It’s been a while since I was on here, but I hope someone can help me. Here’s the thing I am having trouble with. As an example 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 can not find a solution using either grep -o or sed, so I am hoping someone has a solution for my prolem.
Thanks for any help.