2014-10-22 65 views

回答

2

使用負回顧後:

puts 'here is \"what\" I am "thinking"'.gsub(/(?<!\\)"/, '\"') 
# => here is \"what\" I am \"thinking\"