I have a string variable with content:
varMessage = \"hi/thsid/sdfhsjdf/dfjsd/sdjfsdn\\n\" \"/my/name/is/balaji.so\\n\"
You can also do this...
my_string = "Hello world" if my_string["Hello"] puts 'It has "Hello"' else puts 'No "Hello" found' end # => 'It has "Hello"'
This example uses Ruby's String #[] method.