• 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: text item delimiters question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: text item delimiters question


  • Subject: Re: text item delimiters question
  • From: John Delacour <email@hidden>
  • Date: Wed, 5 Mar 2003 13:51:16 +0000
  • Mac-eudora-version: 6.0a9

At 1:18 pm +0100 5/3/03, Jacco Rens wrote:

I got an question regarding the use of text item delimiters,

i want to get the first part of the following data: "GEIND*E10,71/KOSTEN*E0,08" So that i get "GEIND*E10,71" in my var.

Unless someone can convince me otherwise, it's never necessary to write "Applescript's" and "my" will do. I'm also one of those who code in such a way as not to bother about the current setting.


You can do it in your case either by setting the delimiters or by getting the offset of the delimiter.


set _string to "GEIND*E10,71/KOSTEN*E0,08"
set my text item delimiters to "/"
set s to the first text item in the _string
set my text item delimiters to ""
s
--> "GEIND*E10,71"

or


set _string to "GEIND*E10,71/KOSTEN*E0,08"
set n to offset of "/" in _string
_string's text 1 through (n - 1)
--> "GEIND*E10,71"
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: text item delimiters question
      • From: Emmanuel <email@hidden>
References: 
 >text item delimiters question (From: Jacco Rens <email@hidden>)

  • Prev by Date: Re: text item delimiters question
  • Next by Date: Re: Extracting attachment from Mail
  • Previous by thread: Re: text item delimiters question
  • Next by thread: Re: text item delimiters question
  • Index(es):
    • Date
    • Thread