[eluser]Dsyfa[/eluser]
Hi,
I'm trying to extract the body of a view file using regular expression but it doesn't work.
Code:
$body = $this->load->view( 'newsFeed', '', true );
$regex = "@\<body\>(.*?)\</body\>@i";
$matches = array();
preg_match ( $regex, $body, $matches );
print_r( $matches );
The view file is basically simple:
Code:
<html>
<head>
<title>Hello</title>
</head>
<body>
Hello World!
</body>
</html>