I want to parse text like this
<! this is inside a token > text outside the token <! more inside > more outside
and I want to capture all the tokens and replace them with <span>...</span>
tags.
For instance
<! this is inside a token >
should get replaced with
<span> this is inside a token </span>
I tried regex /<!(.+)>/
but it just captures the whole string.