I’ve actually done all of those things, and using regular expressions for inappropriate purposes remains entertaining, especially for the reactions. Perhaps you need to revisit the joy of making something work in completely the wrong way.
It's the job of the XML parser to answer the question "is this properly formed XML?" -- so you have indeed made something that "works" in completely the wrong way, by not working correctly.