in reply to Regular expression seems to be greedy
It is not 100% clear what you want to match in general, but for this string
gives the desired result.s/<[^<>]*>//;
the perlre manpage has more info about greedyness vs left-first matching. See section "Version 8 Regular Expressions", paragraph 7, or the section on backtracking (search for got <d is under the bar in the >)
|
|---|