   # * Delimiters
   # * quoted fields
   # * and standard fields
-  objPattern = ///
+  csv._objPattern = ///
     (
       \ #{strDelimiter}
-      | \r?\n
-      | \r
-      | ^
+      |
+      \r?\n
+      |
+      \r
+      |
+      ^
     )
     (?:
-      "([^"]*(?:""[^"]*)*)"
-      | ( [^"\ #{strDelimiter}\r\n]* )
+      "(
+        (?:
+          \\"
+          |
+          [^"]
+        )*
+      )"
+      |
+      (
+        [^"\ #{strDelimiter}\r\n]*
+      )
     )
   ///gi
 
-  while arrMatches = objPattern.exec(strData)
+  while arrMatches = csv._objPattern.exec(strData)
     strMatchedDelimiter = arrMatches[1]
 
     if strMatchedDelimiter.length and (strMatchedDelimiter isnt strDelimiter)

      row = []

    if arrMatches[2]
      strMatchedValue = arrMatches[2].replace /""/g, "\""
    else
      strMatchedValue = arrMatches[3]

    if csv.settings.parseFloat and !isNaN (parsedMatch = parseFloat strMatchedValue)

csv.settings =
  delimiter: ","
  parseFloat: true
  removeTrailingNewlines: true

@csv = csv

