Re: Finding Filenames that contain a certain string
Re: Finding Filenames that contain a certain string
- Subject: Re: Finding Filenames that contain a certain string
- From: Alexis Gottlieb <email@hidden>
- Date: Fri, 20 Jul 2007 11:58:58 +0200
On 20 juil. 07, at 03:16, Mark J. Reed wrote:
The use of regexes (or other pattern matching) still doesn't mean you
have to use the shell, of course. Satimage's regex capabilities will
do the trick. But unlike "do shell script", Satimage doesn't ship
with the OS (does that make it less pure/"vanilla" in your eyes?).
Here is a basic example using regexp features of Satimage.osax:
set f to path to preferences
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {return}
set theResult to find text "^.*apple.*$" in ((get list folder f) as
string) with regexp, string result and all occurrences
set AppleScript's text item delimiters to oldDelims
theResult
NB: Satimage.osax is free and can be downloaded at:
http://www.satimage.fr/software/en/downloads_osaxen_pop.html
Regards,
Alexis
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden