<(title|head).*?>(.*?)<\/\1>
This regex would contain the tag in it's first match group, and the inner html of the tag in it's second group - but consider going with XPath or any HTML/XML parser, because of Zalgo.
You need PCRE to use this expression, because of the non-greedy wildcards.