preg_match("/<body\s([^>]*)/i", $html, $args); $body_props = $args[1];
preg is much faster/better than ereg. note the /i at the end of the preg, that makes it case insative, drop the i if you want it to be case sensative on the match. -Joe "John Monfort" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hello everyone! > > I'm trying to get the text inside the <BODY> tag, using regular > expression. > > $area = eregi('(<body)(.*)<">)',$str); > > Where $str is the string containing > <body bgcolor="#999999" tex="#..." ...> > > When I print $area, the string contains the entire content of $str. I > get something like: > > <body ...> > <p> > . > . > . > </body> > </html> > > > > __________John Monfort_________________ > _+-----------------------------------+_ > P E P I E D E S I G N S > www.pepiedesigns.com > "The world is waiting, are you ready?" > -+___________________________________+- > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]