Re: How to extract the email address in a the message body
Re: How to extract the email address in a the message body
- Subject: Re: How to extract the email address in a the message body
- From: Bernardo Hoehl <email@hidden>
- Date: Mon, 8 Nov 2004 14:20:27 -0200
Its is a very, very quick and dirty way of doing this find, but it
works for me most of the time.
Just treat emails as "words" that must contain a "@", and may contain
somethingelse from a list such as {"net", "com", "ind", "org",
etc..etc.}
Hope it helps,
Bernardo Höhl
Rio de Janeiro - Brazil
+++++++++++++++++++++++++
On 8 Nov, 2004, at 1:43 PM, Joseph Weaks wrote:
On Nov 8, 2004, at 7:44 AM, Randal L. Schwartz wrote:
"Leon" == Leon Chen <email@hidden> writes:
Leon> I do not mean those addresses in the header. I am looking at
picking
Leon> up those within the message body which i believe need a certain
Leon> search mechanism called from Applescript. not sure it can be
done.
"Email addresses in text with unknown boundary delimiters" is an
extremely difficult problem, mostly because email addresses are
incredibly complex. For example, you'd have to locate
merlyn (that is me)
@
stonehenge (not the one in england, the other one)
. (that is a dot!)
com
Yes, all on separate lines. That's a valid email address. Even with
the comments. So is this-- fred&email@hidden and it's an
auto
responder, so go ahead and try it. But wait... was the "this--"
part of the email address or not? You can't tell! The delimiters
are not inherent in the message.
So, if your problem is narrower than that, it might help to narrow
down what you are willing to look for and willing to reject.
How is "this-- part of the addy? You can't have a space in a valid
addy.
Well, if this guy ISN'T doing a project for NASA and CAN lower his
standards a bit. Just find every occurrence of "@" that's not
immediately next to punctuation or whitespace, and then capture all
the text between the space before the "@" and the space after it. That
will capture most of the standard and URL formats, what, like
99.sumthin% of them?
It will also capture other uses of the "@", so just allow for that.
Joe Weaks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden