• 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: list of (more than one) text item delimiters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >list of (more than one) text item delimiters (From: Brennan <email@hidden>)
 >Re: list of (more than one) text item delimiters (From: Bill Briggs <email@hidden>)

  • Prev by Date: Re: On quit in stay-open ap
  • Next by Date: Re: list of (more than one) text item delimiters
  • Previous by thread: Re: list of (more than one) text item delimiters
  • Next by thread: On quit in stay-open ap
  • Index(es):
    • Date
    • Thread