The following regex matches your xml. It also captures everything inside the asp:content tags and places it in Group 1.
(?s)<asp:Content ID="[^"]*"\W+ContentPlaceHolderID="[^"]*"\W+runat="[^"]*">(.*?)</asp:Content>
Note that (?s) is the inline modifier that turns on the "dot matches new line" mode in certain regex flavors, such as .NET, Java, Perl, Python, PCRE for PHP's preg functions.
If you are using a different regex flavor, you will need to remove (?s) and activate "dot matches new line" differently.
The following code retrieves the group captures. To show a general solution, the subject string contains two of these placeholders.
<?php
$subject='
<asp:Content ID="blah" ContentPlaceHolderID="blah" runat="blah">Capture Me!</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="header" runat="server">
<div>
<categories>
<category>
<name>item 1</name>
<categories>
<category>
<name>item 1.1.</name>
</category>
<category>
<name>item 1.2.</name>
</category>
</categories>
</category>
</categories>
</div>
</asp:Content>
';
preg_match_all('%(?s)<asp:Content ID="[^"]*"\W+ContentPlaceHolderID="[^"]*"\W+runat="[^"]*">(.*?)</asp:Content>%', $subject, $result,PREG_OFFSET_CAPTURE | PREG_PATTERN_ORDER);
for ($i = 0; $i < count($result); $i++) {
echo "Capture number: ".$i."<br />".htmlentities($result[1][$i][0])."<br /><br />";
// echo "Match number: ".$i."<br />".htmlentities($result[0][$i][0])."<br /><br/>";
}
?>
Here is the output:
Capture number: 0
Capture Me!
Capture number: 1
<div> <categories> <category> <name>item 1</name> <categories> <category> <name>item 1.1.</name> </category> <category> <name>item 1.2.</name> </category> </categories> </category> </categories> </div>
If you also want to display the whole match (not just the capture), just uncomment the second echo line in the for loop.
I think this is what you were looking for?