RegExps in AS
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