Skip to content

Instantly share code, notes, and snippets.

@farhansalam
Created July 20, 2016 09:10

Revisions

  1. farhansalam created this gist Jul 20, 2016.
    2 changes: 2 additions & 0 deletions Regex for nested double qoutes.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@

    eval('["foo","bar","foo "bar"baz"]'.gsub(/(\b)\s?"\s?(\b)/,'\"'))
    2 changes: 2 additions & 0 deletions Regex for nested double qoutes_console_dump.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
    >>> => ["foo", "bar", "foo\"bar\"baz"]