• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Parsing out words in email subject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Parsing out words in email subject (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Parsing out words in email subject
  • Next by Date: Re: Send outgoing message error from Mail.app
  • Previous by thread: Re: Parsing out words in email subject
  • Next by thread: Re: Parsing out words in email subject
  • Index(es):
    • Date
    • Thread