d0n 0 Posted April 26, 2010 If a string has both " and ' in it, how do i quote it ?? ex. $String = Jim said "This is his' house" how do i quote it? Share this post Link to post Share on other sites
MrMitchell 16 Posted April 26, 2010 (edited) Put double quotes around the entire string, double-double quote anywhere you want a double quote to appear within the string. $string = " Jim said ""This is his' house"" " MsgBox(0, "", $string) Alternatively put single quotes around the entire string then double-single quote anywhere you want single quotes to appear within the string: $string = ' Jim said "This is his'' house" ' Full explanation on this page: http://www.autoitscript.com/autoit3/docs/intro/lang_datatypes.htm Edited April 26, 2010 by MrMitchell Share this post Link to post Share on other sites
czardas 1,269 Posted April 26, 2010 (edited) As an alternative: you can also introduce the the double quotation marks as ascii codes. $string = "$string = "&Chr(34)&" Jim said "&Chr(34)&Chr(34)&"This is his' house"&Chr(34)&Chr(34)&Chr(34) MsgBox(0, "", $string) I sometimes do this if I want to introduce characters, into my code, which normally form part of (or may interfere with) autoit syntax: I also find it easier to visualize in certain situations. Although it is probably less efficient here, I find I am less likely to make mistakes when using this method. Edited April 26, 2010 by czardas operator64 ArrayWorkshop Share this post Link to post Share on other sites