note 42344 deleted from function.preg-match by aidan
| From: | aidan@php.net | Date: | Sun, 04 Jul 2004 16:22:00 +0000 |
| Subject: | note 42344 deleted from function.preg-match by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72530@lists.php.net to get a copy of this message | ||
Note Submitter: h2oman@imaginedreality.com
----
Need to get the contents of a static page, i.e. everything inside the body tags?
Use the following with preg_match:
preg_match("/<body.*?>(.+)<\/body>/is",$content,$matches);
$matches[1] will contain the body of your page without the opening and closing body tags.