For the non redditors, TIL means “Today I Learned” …
echo ‘<tagtag>sometext</endtagtag>’ | awk -F'[<|>]’ ‘{print $3}’
So yeah, there it is, pretty simple actually. I’d spend time explaining what AWK and the other stuff above means, but if you don’t know that the command won’t be useful to you anyway.