Re: Parsing out words in email subject
Re: Parsing out words in email subject
- Subject: Re: Parsing out words in email subject
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 28 Jan 2010 23:17:30 -0500
- Thread-topic: Parsing out words in email subject
On 1/28/10 7:03 PM, "Shane Stanley" <email@hidden> wrote:
>> As noted in AppleScript Language Guide, the word-break rules may change
>> depending on user settings and system software updates, and should not be
>> relied upon for deterministic parsing of text.
Therefore, if you (Thomas) are certain that the subject will begin with "Re:
", the simplest and surest way would be to forget about words:
set allButRe to text 5 thru -1 of theSubject
Safer would be to test it first, and also to avoid an error if there's no
real subject (i.e. It's simply "Re: ")
if theSubject begins with "Re: " then
try
set allButRe to text 5 thru -1 of theSubject
on error
set allButRe to ""
end if
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden