in reply to Difference between these regexes
I'd recommend this fine paper as a starting point for your investigations. I would continue with Regexp::Debugger, which is more recent.
And I like choice 3 in your original example, although the star suggests you might have '<>' in your input, which I would guess is unlikely. If the tag's empty, there's not much point in outputting it.
|
|---|