Use atomic group for CSV regexp
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1329 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
6ba224be3c
commit
8a048978bf
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue