• 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: yvan-koenig <email@hidden>
  • Date: Wed, 16 Mar 2005 19:25:29 +0100


Le 16 mars 2005 , à 19:18, Todd Geist a écrit :

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?

Todd

Perhaps this may help:

set source to "Have a [Nice] [Day]"

set AppleScript's text item delimiters to "["
set ll to (text items of source)
set AppleScript's text item delimiters to ""
set source2 to ll's item 2
set AppleScript's text item delimiters to "]"
set ll to (text items of source2)
set AppleScript's text item delimiters to ""
set inside to ll's item 1

display dialog "" & inside

Yvan KOENIG


_______________________________________________ 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
References: 
 >Parsing text from a string (From: Todd Geist <email@hidden>)

  • Prev by Date: Adding to a text file
  • Next by Date: Re: Parsing text from a string
  • Previous by thread: Parsing text from a string
  • Next by thread: Re: Parsing text from a string
  • Index(es):
    • Date
    • Thread