RE: [PHP] Which Regex library?
| From: | Shawn J. Wallace | Date: | Mon, 05 Feb 2001 14:16:41 +0000 |
| Subject: | RE: [PHP] Which Regex library? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-38234@lists.php.net to get a copy of this message | ||
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 (shawn@justweb.com)
Justweb Inc. - http://www.justweb.com
(519)652-6599 or (800)343-9312