help using "sed" in applescript

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
37pens
Harmless
Posts: 6
Joined: Mon Dec 06, 2004 2:28 am

help using "sed" in applescript

Post by 37pens »

After a couple ours of looking at other's scripts, and googling I've been unable to use sed in one of my applescripts.

here's basically what i need to do:


ugly = "Iím in here. Wouldnít you like to be in here too?"


I need to change the "í" into apostrophes

My problems are:
1) I can't change the value of a variable. (I can sed things in text files)
2) I can't seem to escape the single quote.


Thanks.
BlueRevolution
Latté
Posts: 62
Joined: Sat Dec 04, 2004 6:16 am
Contact:

Post by BlueRevolution »

I have a sub to fix that exact problem in my whedonesquism script. feel free to steal it.
User avatar
zaudragon
Growl Team
Posts: 1852
Joined: Sat Dec 04, 2004 5:05 am
Location: Kensington, CA, USA
Contact:

Post by zaudragon »

can't you escape ' by using \' ?

I used it in my ü8312-1_££7 script as \"
Blog | X(tras)
Communists code without classes.
37pens
Harmless
Posts: 6
Joined: Mon Dec 06, 2004 2:28 am

Post by 37pens »

Thanks a lot BlueRev that worked perfectly.


zau - for whatever reason using \ to escape the ' just wouldn't work for me. Thanks though
Post Reply