• 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
RegExps in AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RegExps in AS


  • Subject: RegExps in AS
  • From: "Ihar 'Philips' Filipau" <email@hidden>
  • Date: Sun, 20 Feb 2005 18:35:58 +0100

Hi!

[ I have checked archives of mail list, and found nothing interesting. If I have missed something I'd love to be pointed out in right direction. ]

I have found is that AS is completely missing regular expression support.
I have tried to strip extension from file name and after three hours ended up with 20 lines of code which works most of the time. That compared to single line of PCRE (Perl Compatible Regular Expressions) which handles all cases all the time. Not the point AS shines at.


In past I have explained to number of non-tech people how regexps do work, but if someone would ask me how to do anything with text in AS, I'd rather say "sorry pal, you can't".

How do you people do in AS simple things like: strip extension (if file has one), strip directories from path name (if there anything to strip), extract extension (if name has one), extract path name (if name has one), etc.

P.S. And I need this to work on standard Mac OS 10.3.x. Without external applications please, code in question has to work on iTunes library with thousand files - calling external applications is un-Unixy terribly expensive.

--
  A civilization is built on what is required of men,
  not on that which is provided for them.
      -- Antoine de Saint-Exupery

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: RegExps in AS
      • From: Nigel Smith <email@hidden>
    • Re: RegExps in AS
      • From: Christopher Stone <email@hidden>
    • Re: RegExps in AS
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Restoring a user account...
  • Next by Date: Re: RegExps in AS
  • Previous by thread: Restoring a user account...
  • Next by thread: Re: RegExps in AS
  • Index(es):
    • Date
    • Thread