Replace Command

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
warrenk
Posts: 110
Joined: Sun Sep 21, 2008 5:39 am

Replace Command

Post by warrenk » Wed Mar 25, 2009 6:51 pm

I would like to replace a double quote (") with another character. How would I specify the double quote without getting a error?

Thanks for any help!
Warren

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Post by sturgis » Wed Mar 25, 2009 7:03 pm

edit: Knew i'd seen this in another post:
http://forums.runrev.com/phpBB2/viewtopic.php?t=2781

you can just use the quote keyword, what you want to replace it with, and where the string is that you're modifying.

so if a var theVar has the string "This is a "test" string" in it

Code: Select all

replace quote with "q" in theVar
answer theVar
Last edited by sturgis on Wed Mar 25, 2009 10:26 pm, edited 1 time in total.

warrenk
Posts: 110
Joined: Sun Sep 21, 2008 5:39 am

Post by warrenk » Wed Mar 25, 2009 7:10 pm

Thanks Sturgis! appreciate the help!

Warren

Post Reply