Wanted to convert
into
Enhanced readability, shorter, produces correct output regardless of attributes:
preg_replace('{(]*>\s*)+}', '', $input);