php-general | 2001122
Date: 12/26/01
- Next message: Todd Cary: "[PHP] Listing files"
- Previous message: Richard S. Crawford: "Re: [PHP] How to strip off all html-comments"
- In reply to: James Cox: "RE: [PHP] Client side fatal PHP error"
- Next in thread: Brian Clark: "Re: [PHP] Regular Expression Help"
- Reply: Brian Clark: "Re: [PHP] Regular Expression Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Todd Cary: "[PHP] Listing files"
- Previous message: Richard S. Crawford: "Re: [PHP] How to strip off all html-comments"
- In reply to: James Cox: "RE: [PHP] Client side fatal PHP error"
- Next in thread: Brian Clark: "Re: [PHP] Regular Expression Help"
- Reply: Brian Clark: "Re: [PHP] Regular Expression Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

