Hello everyone,

I'm using regular expression to extract all text within the <body> tag.
With a BODY tag like

<body bgcolor="" ... text="">   \\only interested in this line.

I use

eregi("( <body ) (.*) (\">) ",$str,$out);
\\spaces included, here, for easy reading.

echo "$out[0]";

However, this prints everything following (and including) the '<BODY'
portion of the BODY tag.

Ex.
 <body text=" "...alink="">
 <table>....</table>
 ...
 </body>
 </html>

I want it to ONLY take the text within the openning body tag. Like,
<body ... >

how do I do this? What am I missing, in the above?

eregi("(<body)(.*)(>)",$str,$out);

-Please help.

-john



-- 
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]

Reply via email to