Originally Posted by chaley
Don't you mean '<p[^>]*>'? Also, this won't work if any of the internal attributes contain a > character. Consider <p foo=">">.
I did mean '<p[^>]*>', thanks. I was aware of the problem with internal attributes being a problem for that expression, but I figured that was getting into a rat-hole for this level of tutorial and in practice it's pretty rare.