escaping - Ruby gsub doesn't escape single-quotes -
I do not know what's going on here, how do I feed the jib to get the string "Yaho \ 'o? / P>
& gt; "Yaho'o" .gub ("Y", "\\ Y") = & gt; "\\ Yaho'o"> & gt; "Yaho'o" .gub ("',' \\ '") => "Yahoo" "
\ 'means $ is' which is everything after the escape escapes again And it works
"Yaho'o" .gsub ("',' \\\ '' ')
Comments
Post a Comment