The things is, if you try to parse html with a regex, you will always be able to construct valid html that will break it, no matter how complex your regex becomes.
Python or Perl. IIRC, I’ve seen systems with a Perl install by default, but not Python.
On the internet, no one can tell you’re a duck.
It’s definitely great in theory until you inherit a codebase with no tests, poor documentation, and numerous reported bugs already live in production. Even better if it was written by people hired because they could do other things better than they could code - which looking at some of the unlabeled wiring messes we were left, isn’t saying a lot.
As someone who used to troubleshoot an extremely complex system for my day job, I can say I’ve worked my way across the entire bell curve.