From 8a048978bf3aa5ba7dd8e4967c7ffda25a39e6a0 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Wed, 24 Feb 2010 13:12:58 +0000 Subject: [PATCH] Use atomic group for CSV regexp git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1329 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/select.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index a5998ebc..920b1fc2 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -98,7 +98,7 @@ if ($_POST && !$error) { $file = preg_replace("~^\xEF\xBB\xBF~", '', $file); //! character set $result = true; $cols = array_keys($fields); - preg_match_all('~("[^"]*"|[^"\\r\\n])+~', $file, $matches); + preg_match_all('~(?>"[^"]*"|[^"\\r\\n]+)+~', $file, $matches); $affected = count($matches[0]); queries("START TRANSACTION"); foreach ($matches[0] as $key => $val) {