eregi help for <body...></body>
| From: | Jeremy Simon | Date: | Fri, 08 Dec 2000 00:00:30 +0000 |
| Subject: | eregi help for <body...></body> | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29241@lists.php.net to get a copy of this message | ||
I need some help with with trying to eregi a file for the <body
bgcolor="#000000"> to the </body>.
My basic code will search for the <body> tag to the </body> tag and return
it. The problem is that I don't have just a simple <body> tag I have a <body
bgcolor="#000000" text="#FFFFFF">. I need a way to have it search for the
"<body" to the first ">" then go the (.*)</body>.
<--Begin Paste --->
function inStringSub($string) {
eregi("<body(.*)</body>",$string,$result);
return($result[1]);
}
<---End Paste --->