$re = '/[\S\s]*<strong>([\S\s]*?BE)/m';
$str = ' <div style="background:#e0dddd; color:#333399; font:9PT \'arial\'; padding:10px; margin-left:-30px; ">
<div>
<strong>Some text here1 </strong><br />
2021-08-08 </div>
<div><p>
Some text here2</p>
</div>
<div class="download">
<a href="index.php?obj=notice_id=1734">View Detail ...</a>
</div>
</div>
<div style="background:#e2ecf4; color:#333399; font:9PT \'arial\'; padding:10px; margin-left:-30px; ">
<div>
<strong>Some text 3</strong><br />
2021-08-06 </div>
<div><p>
Some BE text 4.</p>
</div>
<div class="download">';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php