You probably could just write:
$text = preg_replace('/<title.*/i', '', $text);
The idea is that the pattern matches until the end of line unless you state otherwise.
The only catch is that it looks like you are relying on the title element being on a single line, and nothing else being on that line. Unfortunately, since you only stated what you wanted to happen and not what you are trying to do, I cannot accurately advise you further.