RE: [PHP] very simple eregi / loop question
| From: | Scott Hurring | Date: | Fri, 07 Jun 2002 20:52:23 +0000 |
| Subject: | RE: [PHP] very simple eregi / loop question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-101191@lists.php.net to get a copy of this message | ||
well, either make sure $search contains the entire page
or, you have an array fo lines, loop thru it line by line
foreach ($lines as $line)
eregi( ... )
AFAIK, eregi will match *everything* and dump it all into
$matches (at least that's the behaviour that pregs follow,
i dont use eregs)
---
Scott Hurring
Systems Programmer
EAC Corporation
ScottH@eac.com
Voice: 201-462-2149
Fax: 201-288-1515
> -----Original Message-----
> From: Robert [mailto:robert@nrc.net]
> Sent: Friday, June 07, 2002 4:46 PM
> To: php-general@lists.php.net
> Subject: [PHP] very simple eregi / loop question
>
>
> How would you loop though a file ( or web page) and get all
> of a certain
> thing. I'm trying to strip stuff out of tables, but I have
> only managed to
> get the first of what I'm searching for. My expression is
> eregi("[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}", $search,
> $content);
> which does the job, but how do I apply that to get all of
> that from the
> page?
>
> thanks
>
> --
>
>
>
>
> ------------------------------------------------------------
>
>
> Robert Packer
> Programming and Design Associate
> 814-944-1108
> robert@nrc.net
> -- NRC Online --
>
> ------------------------------------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>