Here is a piece of code:

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

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

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

But I can't do it - I already broke my whole head .. Help please, I will say thank you;)

Closed due to the fact that the essence of the question is not clear to the participants Visman , Aries , Vladimir Glinskikh , Spawn , aleksandr barakin 24 Oct '15 at 7:37 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

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

    something like this