Re: extracting email addresses

From: Date: Thu, 17 May 2001 17:13:56 +0000
Subject: Re: extracting email addresses
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-7673@lists.php.net to get a copy of this message
I found this as a solution: $content = eregi("([[:alnum:]_.-]+)@([^[:space:]>;\"]*)", $contents, $EmailArray); echo"$EmailArray[0]"; but I have to try with your solution too. Thank you Mike. p.s. It's not for spam. Client want to check his incoming emails! ----- Original Message ----- From: "Michael Rudel" <mru@suchtreffer.de> To: "'afan'" <afan@sprout.net> Sent: Thursday, May 17, 2001 7:09 AM Subject: RE: [PHP-WIN] extracting email addresses > Hey afan, > > just make a strpos for an @, get the first blank with the @ > as offset parameter, substr the string from to the first blank > after the @, and substr the result again from the last blank > (strrpos) to the end. thats it. > > Sorry, but I'm not thinking in regexp's =8) this would be a > better solution. > > Learning by doing. > > Greetinx, > Mike > > P.E.: Plz don't use this to SPAM ! > > > -----Original Message----- > > From: afan [mailto:afan@sprout.net] > > Sent: Thursday, May 17, 2001 6:56 PM > > To: php-windows@lists.php.net > > Subject: Fw: [PHP-WIN] extracting email addresses > > > > > > Thanks Johan for your HELP! > > > > ----- Original Message ----- > > From: "Johan Lundqvist" <johan@noatun.org> > > To: <php-windows@lists.php.net> > > Sent: Thursday, May 17, 2001 12:38 AM > > Subject: Re: [PHP-WIN] extracting email addresses > > > > > > > Get in contact with some SPAM people... they all seem to > > get it done... > > > > > > afan wrote: > > > > > > > > Hi all, > > > > there is my problem: I have a large text file with a lot of email > > addresses included in text. I have to extract just email > > addresses from a > > whole text. > > > > What's the way to do that? > > > > > > > > Thanks for any help! > > > > > > > > Afan > > > > > > -- > > > PHP Windows Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-windows-help@lists.php.net > > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > > > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > > For additional commands, e-mail: php-windows-help@lists.php.net > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > >

« previous php.windows (#7673) next »