note 42344 added to function.preg-match
| From: | h2oman at imaginedreality dot com | Date: | Wed, 12 May 2004 19:24:17 +0000 |
| Subject: | note 42344 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69535@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/function.preg-match.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42344
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42344&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42344&report=yes
Search -- http://master.php.net/manage/user-notes.php