well, i would try this:
ereg('([0-9]+\.){4}', $email, $res);

I'm not sure if that will work, but your expression is definitely not
correct.  I would reduce it down to its most basic element, perhaps, and
try that:

ereg('[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+', $email, $res);

If that works, then just use that.

johnny p.

> -----Original Message-----
> From: Shawn J. Wallace [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 05, 2001 8:17 AM
> To: johnny p.
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Which Regex library?
>
>
> Ok, this is from memory, but.. I'm trying to pull the IP
> addresses of mail
> relays out of an email - and they are of the form
> [xxx.xxx.xxx.xxx], so I
> do something like:
>
> ereg('\[(0-9\.)*]', $email, $res)
>
> It finds some but not all of them in the email.  What I
> really do is put
> that in a while statement and replace each found ip with a
> marker so I can
> repeat the regex again and again.
> ---
> Shawn J. Wallace ([EMAIL PROTECTED])
> Justweb Inc. - http://www.justweb.com
> (519)652-6599 or (800)343-9312
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to