Re: Simple character substitution
Re: Simple character substitution
- Subject: Re: Simple character substitution
- From: Gnarlodious <email@hidden>
- Date: Sun, 26 Jun 2005 14:32:42 -0600
Entity Irwin Poche uttered this profundity:
set theText to "
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.
Can someone tell me how to do this ?
Thanks in advance,
-Irwin"
do shell script "echo " & the quoted form of theText & " | tr '\\r' '\\n' |
sed 's/this/that/g' "
-- Gnarlie
_______________________________________________
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