RE: [PHP] Real world regex

2002-03-04 Thread Craig Westerman

-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 8:55 AM
To: Craig Westerman; php-general-list
Subject: Re: [PHP] Real world regex

> For another I need to get the 3rd opening table row  tag after the 7th
> opening  tag.

not tested:
"(]+>.*){6}(]+>)([ ]*)(]*>)(.*){2}(]*>)(.*)"

-


Bas,

Thanks for the reply. I can easily grab this test page
http://www.gold-forum.com/table.html using this script. (shown below)
http://www.gold-forum.com/grab2.php

When I try replacing $GrabStart = ""; with your $GrabStart =
"(]+>.*){6}(]+>)([ ]*)(]*>)(.*){2}(]*>)(.*)";
I get errors.

If you have time, can you show me what I need for:

$GrabStart = "???"; //3rd opening table row  tag after the 7th opening
 tag
$GrabEnd = "???"; //3rd closing table row  tag after the 7th closing
 tag

Thanks

Craig ><>
[EMAIL PROTECTED]


code start-


Grab 2 Example




http://www.gold-forum.com/table.html";;
$GrabStart = ""; //need 3rd opening table row  tag after the 7th
opening  tag
$GrabEnd = ""; //need 3rd closing table row  tag after the 7th
closing  tag

$file = fopen("$GrabURL", "r");
$rf = fread($file, 20);
$grab = eregi("$GrabStart(.*)$GrabEnd", $rf, $printing);
fclose($file);
echo $printing[1];
?>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Real world regex

2002-03-04 Thread Bas Jobsen

> For another I need to get the 3rd opening table row  tag after the 7th
> opening  tag.

not tested:
"(]+>.*){6}(]+>)([ ]*)(]*>)(.*){2}(]*>)(.*)"


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php