| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On 2007-06-02, at 13:52:38, Doug McNutt wrote: I did a variant of the short form in Tcl and it works remarkably well. However, for the purposes of using it to grab email addresses from an arbitrary Mail message (using Luther's 'content of'), the results, although generallly better than Deivy's, are not 100% accurate and in some cases return nothing when one can clearly see there is a valid email address in the content. Neither is using 'source of' because then it will also return all @s in the headers. Change 'content of' to 'source of' to see the difference. tell application "Mail" to set m to (content of item 1 of (get selection)) as text set res to {} set {tids, AppleScript's text item delimiters} to {AppleScript's text item delimiters, space} set res to text items of (do shell script "echo 'puts [lsort -dictionary -unique [regexp -all -nocase -inline -- {[0-9A-Z._%-]+@[0-9A-Z.-]+[A-Z]{2,4}} {'" & quoted form of m & "'}]]' | tclsh") set AppleScript's text item delimiters to tids res Philip Aker 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: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/archives/applescript-users This email sent to email@hidden
| References: | |
| >Re: Searching a Mail message (From: Jeffers <email@hidden>) | |
| >Re: Searching a Mail message (From: Luther Fuller <email@hidden>) | |
| >Re: Searching a Mail message (From: Michelle Steiner <email@hidden>) | |
| >Re: Searching a Mail message (From: Luther Fuller <email@hidden>) | |
| >Re: Searching a Mail message (From: Michelle Steiner <email@hidden>) | |
| >Re: Searching a Mail message (From: Doug McNutt <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.