Re: list of (more than one) text item delimiters
Re: list of (more than one) text item delimiters
- Subject: Re: list of (more than one) text item delimiters
- From: Christopher Stone <email@hidden>
- Date: Tue, 16 Dec 2003 10:19:04 -0600
At 3:42 PM +0100 16/12/03, Brennan wrote:
Is it possible to use more than one text item delimiter at a time, for
example, given the timecode string,
"01:23:12.03"
I'd like to be able to use the delimiters {":", "."} to fish out all the
numerical values in one fell swoop.
set {HH, MM, SS, tt} to text items of myString
______________________________________________________________________
This is a job for the Satimage osax and regular expressions:
set theText to "01:23:12.03"
try
set {HH, MM, ss, tt} to find text "[0-9]+" in theText with regexp, all
occurrences and string result without case sensitive
on error
set findIt to false
end try
http://www.satimage.fr/software/en/downloads_osaxen.html
Chris
_______________________________________________
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.