You would definitely be surprised! The classic StackOverflow answer that people generally get pointed to when they try is this one. All gimmicks of said answer aside, the relevant line in there is "HTML is not a regular language and can't be parsed with regular expressions", and any solution that relies on "is this chunk of arbitrary HTML enclosed in paragraph tags" is ... well, it's not IMPOSSIBLE, it could theoretically be done, but the performance issues and complexity makes it really, really impractical, especially for us.
no subject