Here is what I need to be able to do:
I need to match the following tag:
text sample
You'll need several lines like this:
preg_replace('|(.+?)|', '$1', $text);
preg_replace('|(.+?)|', '$1', $text);
preg_replace('|(.+?)|', '$1', $text);
etc. Although if there's any possibility that the tags won't exactly match those regular expressions (which is usually the case, except for very simple machine-generated HTML), doing this with regular expressions becomes fiendishly complicated, and you'd be better off using a parser of some kind.