ID が特定の文字列で始まり、何かで終わる div からコンテンツを抽出したい。例:
私はdivを持っています
<div id="content_message_56384">
My first post.
</div>
私のコード:
$regex = '#\<div id="content_message_[*]"\>(.+?)\<\/div\>#s';
preg_match($regex, $intro, $matches);
echo $match = $matches[0];
しかし、私は何の結果も得ていません。助けてください。