in reply to Re: Regular Expression
in thread Regular Expression

I was directed to the second regexp this post as a solution that fixes problems in another post, but it's no better.
but assumes proper quoting of the attributes:

The HTML spec allows for single quotes, and even allows for the quotes to be omitted in some circumstances, so no, it doesn't assume proper quoting.

Also, it doesn't handle > inside of quotes (where it doesn't need to be escaped).

Finally, it could locate <body> inside of a comment or inside of another attribute.