From: Nathan Clark Date: 2010-12-30T09:40:27+09:00 Subject: Re: how can i include a double quote in a string > i need to a include a double quote in a string without it being escaped. > For example > > astring="first few characters" > bstring="last characters" > > When i tried >   newstring = astring + '"' + bstring + '"' > > newstring ended up as 'first few characters\"last characters\"' > > What trick can i use to obtain a string 'first few characters "last > characters"' out of the 2 string variables.  That is for ruby not to > escaped the double quote. > > Thanks in advance. irb> newstring => "first few characters\"last characters\"" irb> puts newstring first few characters"last characters" => nil The quotation marks aren't actually escaped, they're just shown that way on inspection to differentiate them from the quotation marks delimiting the entire string.