how to preg_match_all html tag in php [duplicate]

I am trying to get the data in the html code.

I tried to do something but it didn’t work. Can you help me?

$metin = "<div><b>bla bla bla</b>/<div>";
$pattern = '<div><b>(.*?)</b></div>';
preg_match_all($pattern,$metin,$haslar);
print_r($haslar);