Re: hopefully easy
| From: | Didier McGillis | Date: | Wed, 29 Jan 2003 14:19:52 +0000 |
| Subject: | Re: hopefully easy | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-133498@lists.php.net to get a copy of this message | ||
cool thanks
From: "1LT John W. Holmes" <holmes072000@charter.net> Reply-To: "1LT John W. Holmes" <holmes072000@charter.net> To: "Didier McGillis" <codesmoker@hotmail.com>, <php-general@lists.php.net> Subject: Re: [PHP] hopefully easy Date: Wed, 29 Jan 2003 08:58:50 -0500 I need to parse an HTML file for certain information. Like the text between <title></title>. So if the html was ... <html> <head> <title>The page</title> </head> <body> Lots of code ................. </body> </html> I would just like the "The page" text. preg_match("!<title>(.*)</title>!si",$html,$match); echo $match[1]; That will account for <title> vs <TITLE> and also if <title> and </title> are on separate lines. You may have to add a U modifier if there is a chance </title> would be somewhere else in the text, although I don't know why it would be... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php_________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963