retrieve email address

This is a discussion on retrieve email address within the PHP General forums, part of the PHP Programming Forums category; I would like to retrieve email address from email with regular expression. ------email------------ .. .. .. From: testaddress@gmail.com .. .. .. ------------------------------ if anybody know ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-04-2008
Yui Hiroaki
 
Posts: n/a
Default retrieve email address

I would like to retrieve email address from email with regular expression.

------email------------
..
..
..
From: testaddress@gmail.com
..
..
..
------------------------------

if anybody know how to do it, please send me email.

Regards,
Yui
Reply With Quote
  #2 (permalink)  
Old 05-04-2008
Richard Heyes
 
Posts: n/a
Default Re: [PHP] retrieve email address

> I would like to retrieve email address from email with regular expression.
>
> ------email------------
> .
> .
> .
> From: testaddress@gmail.com
> .
> .
> .
> ------------------------------
>
> if anybody know how to do it, please send me email.


Can, worms, everywhere. Try looking at the Mail::RFC822 package in PEAR.
There's also a shortcut function for just matching an Interweb email
address.

--
Richard Heyes

+----------------------------------------+
| Access SSH with a Windows mapped drive |
| http://www.phpguru.org/sftpdrive |
+----------------------------------------+
Reply With Quote
  #3 (permalink)  
Old 05-04-2008
Hans Wolters
 
Posts: n/a
Default Re: retrieve email address

In article <ad53f65d0805041138r6e5fdd07l4aa93b12b61948a9@mail .gmail.com>,
"Yui Hiroaki" wrote:
> I would like to retrieve email address from email with regular expression.
>
> ------email------------
> From: testaddress@gmail.com
> ------------------------------
>
> if anybody know how to do it, please send me email.


Posting on usenet means you will need to review what people answer on usenet.

The original regex to check an e-mail address is some 64Kb afaik. Dot you
really want to see it here?

http://ex-parrot.com/~pdw/Mail-RFC822-Address.html

Best regards,

Hans

--
IM: hans.wolters@xs4all.nl
http://lonki.xs4all.nl

Reply With Quote
  #4 (permalink)  
Old 05-05-2008
Yui Hiroaki
 
Posts: n/a
Default Re: [PHP] retrieve email address

HI!

I do not use PEARm then find email address from email.
Dose anyone know how to get it??

It does noe blow;

ereg("^From: \s+ .*", $data) ;

Regards,
yui

2008/5/5 Richard Heyes <richardh@phpguru.org>:
>
>
> > I would like to retrieve email address from email with regular expression.
> >
> > ------email------------
> > .
> > .
> > .
> > From: testaddress@gmail.com
> > .
> > .
> > .
> > ------------------------------
> >
> > if anybody know how to do it, please send me email.
> >

>
> Can, worms, everywhere. Try looking at the Mail::RFC822 package in PEAR.
> There's also a shortcut function for just matching an Interweb email
> address.
>
> --
> Richard Heyes
>
> +----------------------------------------+
> | Access SSH with a Windows mapped drive |
> | http://www.phpguru.org/sftpdrive |
> +----------------------------------------+
>

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:38 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0