Skip to content

Instantly share code, notes, and snippets.

@knewter
Created March 18, 2010 22:06
Show Gist options
  • Save knewter/336963 to your computer and use it in GitHub Desktop.
Save knewter/336963 to your computer and use it in GitHub Desktop.
irb(main):001:0> txt = "thing1,,thing2"
=> "thing1,,thing2"
irb(main):002:0> a = txt.gsub!(/,,/, ',"",')
=> "thing1,\"\",thing2"
irb(main):003:0> puts a
thing1,"",thing2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment