• 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 text from a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parsing text from a string


  • Subject: Re: Parsing text from a string
  • From: "Marc K. Myers" <email@hidden>
  • Date: Wed, 16 Mar 2005 20:00:55 -0500

On Mar 16, 2005, at 3:01 PM, Todd Geist <email@hidden> wrote:
Hello again.

I am just full of questions today   :>)

If I have the string "Have a [Nice] [Day]"

I want what is in the first set of brackets "Nice".  The brackets will
always be somewhere in the string and I want what is in side of them.

Thanks so much for all your help?

set theText to "Have a [Nice] [Day]" set {od, AppleScript's text item delimiters} to ¬ {AppleScript's text item delimiters, "]"} set x to text items of theText set AppleScript's text item delimiters to "[" set z to "" repeat with anItem in x set y to text items of anItem if (count of y) > 1 then set z to last item of y exit repeat end if end repeat set AppleScript's text item delimiters to od z --> "Nice"

Marc [3/16/05  7:59:36 PM]

_______________________________________________
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


  • Prev by Date: Re: Entourage - moving message to folder
  • Next by Date: RE: Parsing text from a string
  • Previous by thread: Re: Parsing text from a string
  • Next by thread: RE: Parsing text from a string
  • Index(es):
    • Date
    • Thread