Hello people,
I'm trying to collect some data stored between <body> and </body> tags inside a string.
Here's a piece of the code i'm using:
$regex = '/<body>(.*?)<\/body>/si';
preg_match($regex, $content, $content);
$content = $content[0];
This works perfect, except that it also includes the above mentioned tags. I would just like to grab the content in between those tags and store it.
In other words, only store the (.*?) part of the regex.
Anyone have an idea how to solve this? :)