You absolutely can regex (some) html if you sanitize and maybe convert it beforehand.
Btw, why are parsers always built to support the whole thing and maybe throw an error on or just consume unsupported shenanigans? That’s how you get security vulnerabilities in picture formats. Instead of just picking the things you support and ignoring the rest.
deleted by creator