-----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 <tr> tag after the 7th > opening <table> tag. not tested: "(<table[^>]+>.*){6}(<table[^>]+>)([ ]*)(<tr[^>]*>)(.*){2}(<tr[^>]*>)(.*)" ------------------------- 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 = "<body>"; with your $GrabStart = "(<table[^>]+>.*){6}(<table[^>]+>)([ ]*)(<tr[^>]*>)(.*){2}(<tr[^>]*>)(.*)"; I get errors. If you have time, can you show me what I need for: $GrabStart = "???"; //3rd opening table row <tr> tag after the 7th opening <table> tag $GrabEnd = "???"; //3rd closing table row <tr> tag after the 7th closing <table> tag Thanks Craig ><> [EMAIL PROTECTED] ------------code start------------- <html> <head> <title>Grab 2 Example</title> </head> <body> <? $GrabURL = "http://www.gold-forum.com/table.html"; $GrabStart = "<body>"; //need 3rd opening table row <tr> tag after the 7th opening <table> tag $GrabEnd = "</body>"; //need 3rd closing table row <tr> tag after the 7th closing <table> tag $file = fopen("$GrabURL", "r"); $rf = fread($file, 200000); $grab = eregi("$GrabStart(.*)$GrabEnd", $rf, $printing); fclose($file); echo $printing[1]; ?> </body> </html> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php