Re: text item delimiters question
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.