The problem is that the .* part is trying to match the maximum number of chars possible. So, in
<blah>a</blah>
the .* matches the green part.

You can start by adding the ? right after the .*, ie make the pattern like this:
/<.+?>/g
The ? is the ungreedy quantifier. It makes quantifiers like * and + consuming the minimum (instead of the max) number of chars possible. Read more about this in PCRE manual page. Another way would be this:
/<[^<>]+>/g

However, removing html tags perfectly is more complicated: tags that span across lines (or their closing tags do), tags with attributes etc. Making a regex to cover all cases is impossible, since you can't use $regex/$regsub for multiline matches. But for strings that contain both tags in one line and do not contain attributes, quotes etc the way I suggested should be enough.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com