Problem with preg_match_all

Here is a piece of code:

preg_match_all('/<body[^>]*>(.*)<\/body>/', str_replace("\n", '', $str), $out);

The function must parse from the <body>tag to </body>

I want to replace the function to parse from the <img src="115" h="14" w="14" />tag to the <br />

But I can’t do it – I’ve already broken my whole head .. Please help me, I’ll say thank you;)

Answer 1, authority 100%

preg_match_all('/<img.*?\/>(.*?)<br\s*\/>/is', $str, $out);

something like this