Thanks ScallioXTX! That's pretty much what I was after. And thanks for the detailed explanation. I remember look-ahead now, but it's been a while. Thanks also to the other comments.
I was, in fact, trying to get a string containing only div tags (as mentioned by philip). The reason for this is that when examining (e.g. wordpress) generated pages it can be useful to have a skeleton outline of the (potentially bloated) div structure. This can be done by hand, of course, but seems to be against the spirit of computing
Since the tags contain id and class properties, which are useful to know, combining the regex from Scallio with the following gives a visual guide viewable in a browser, showing the nesting and naming of each div without other clutter:
~is', '', $some_html)
Is this the story where someone asks how to move a mountain because they want to lay a pipeline from point A to point B?
Possibly :). Although I knew it would be relatively straightforward to some. I know there are various tools for examining source code, but this seems like a fair use of regexps and can be done in a text editor.