Re: Recursive Character Replacing
Re: Recursive Character Replacing
- Subject: Re: Recursive Character Replacing
- From: julifos <email@hidden>
- Date: Fri, 05 Sep 2003 10:41:21 +0200
>
I wrote a search & replace script a while ago (excerpted below) thinking I'd
>
gain some efficiency from the use of value pairs passed to a handler via a
>
loop. (The full script contains zillions of search criteria.) I gather from
>
your comments above that (aside from the learning experience) I was wasting
>
my time. Am I reading your comments incorrectly? Is there a more efficient
>
way to approach this? (I'm pretty green as an applescripter & don't know
>
anything about benchmarks and all that.)
On my own experience, for *simple* search/replace operations, applescript
TIDs is the faster ever known in AppleScript (eg, string of 25000 bytes,
search for "sorry", replace with "lorry").
For a little-more complex or unknown needs, you need an OSAX, and Satimage
is the faster and strongest one, which supports list-of-strings as
search/replace parameters, regexp expressions and files as input.
This is my idea from pre-X systems, but maybe it needs a revision?
jj
* You can take a look, if interested, to this "old" report on search/replace
routines:
http://homepage.mac.com/julifos/scripts/wis/sr.html
_______________________________________________
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.