• 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: "Stockly, Ed" <email@hidden>
  • Date: Thu, 28 Jan 2010 12:23:03 -0800
  • Thread-topic: Parsing out words in email subject

>> set theWord to first word of theSubject
>> set allButFirst to words 2 thru -1 of theSubject
>> set text item delimiters to space

>The above script will squish space-delimited words into a single word, e.g."one
two three" will come out "onetwothree".

Actually, that snippet would result in a list composed of two, one-word
strings:

{"two", "three"}

And a string with one word:

"one"

Here's a working example with the results of each command noted out to
illustrate the flow:

set theSubject to "one, two. three?"
-->"one, two. three?"

set theWord to first word of theSubject
-->"one"

set allButFirst to words 2 thru -1 of theSubject
-->{"two", "three"}

set text item delimiters to space
-->{" "}

set newString to allButFirst as text
-->"two three"

HTH,

ES



 _______________________________________________
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

  • Follow-Ups:
    • Re: Parsing out words in email subject
      • From: Thomas Fischer <email@hidden>
References: 
 >Re: Parsing out words in email subject (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Parsing out words in email subject
  • Next by Date: Re: Parsing out words in email subject
  • Previous by thread: Re: Parsing out words in email subject
  • Next by thread: Re: Parsing out words in email subject
  • Index(es):
    • Date
    • Thread