A word of caution: this may work with the "<body>" tag as (as far as I know) there should only be one in an HTML page.
Where this is used for tags that can be used multiple times then this will find the first opening tag and match it with the last closing tag in the line (or whole document if the "s" [or "singleline" or "dot matches newline"] option is also specified!!!!).
The traditional solution is to stop the '+' quantifier being greedy (as this is the root cause of the above problem) by using ".+?". However this will match an opening tag with the next closing tag which may or may not be what you want, especially if the tags can be nested.
There are techniques that are available for the .NET and PCRE regex variants that allow you to correctly match an opening tag with its corresponding closing tag but the depend on the special capabilities that each of the variants provides - each goes about this in a different way and so has their own extensions to the standard syntax or behaviour.