• 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: underscore and splitting words from string...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: underscore and splitting words from string...


  • Subject: Re: underscore and splitting words from string...
  • From: "charlie" <email@hidden>
  • Date: Wed, 09 Jan 2008 19:25:46 +0000


correction in description of problem:

that lower block should have had underscores too, obviously...

set savedTextItemDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to {" "}
set listofthree to text of words of "item_a item_b item_c"
set AppleScript's text item delimiters to savedTextItemDelimiters



the problem remains. i just wanted to fix this typo in the description of problem.

anyone know how to keep underscores from acting as implicit delimiters?

- chuck



On January 9, 2008, charlie wrote:


please explain how to get:

{"item_a", "item_b", "item_c"}

from:

"item_a item_b item_c"

instead of:

{"item", "_", "a", "item", "_", "b", "item", "_", "c"}

which i get when i run:

set listofthree to text of words of "item_a item_b item_c"

i've also tried:

set savedTextItemDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to {" "}
set listofthree to text of words of "itema itemb itemc"
set AppleScript's text item delimiters to savedTextItemDelimiters

... but it didn't help

many thanks for any help you can provide.

- chuck


_______________________________________________ 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


_______________________________________________ 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: underscore and splitting words from string...
      • From: KOENIG Yvan <email@hidden>
  • Prev by Date: Leopard breaks Path Item and Photoshop and CS3
  • Next by Date: Re: underscore and splitting words from string...
  • Previous by thread: Re: underscore and splitting words from string...
  • Next by thread: Re: underscore and splitting words from string...
  • Index(es):
    • Date
    • Thread