Re: Simple character substitution
Re: Simple character substitution
- Subject: Re: Simple character substitution
- From: Michelle Steiner <email@hidden>
- Date: Sun, 26 Jun 2005 11:54:46 -0700
On Jun 26, 2005, at 11:47 AM, Irwin Poche wrote:
I have been using a handler I'd written to do simple string
replacements, such as replacing all occurrences of "this" to
"that." Its kludgy, but it's been working - up until I try to
change a single character to multiple characters.
I now realize that perl would probably be the best way of doing
this but how is anything but obvious for the uninitiated (me).
From other postings I believe a do shell script with echo and perl
are what I probably need.
set source to "this is the time for all good blah blah blah."
set single to "l"
set multiple to "llllll"
set text item delimiters to single
set interim to text items of source
set text item delimiters to multiple
set final to interim as text
set text item delimiters to ""
final
--> "this is the time for allllllllllll good bllllllah bllllllah
bllllllah."
--
I am Dyslexic of Borg. Fusistance is retile. Your ass will be laminated.
_______________________________________________
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