Skip to content

Instantly share code, notes, and snippets.

@farhansalam
Created July 20, 2016 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farhansalam/3db19fea69cb7c3b74993c19ab5cb2c1 to your computer and use it in GitHub Desktop.
Save farhansalam/3db19fea69cb7c3b74993c19ab5cb2c1 to your computer and use it in GitHub Desktop.
https://repl.it/CdvP/3 created by farhansalam
eval('["foo","bar","foo "bar"baz"]'.gsub(/(\b)\s?"\s?(\b)/,'\"'))
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
>>> => ["foo", "bar", "foo\"bar\"baz"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment