Greedy expressions

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@105 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2007-07-10 18:53:35 +00:00
parent b7e446b1cb
commit a9907f186c
8 changed files with 14 additions and 15 deletions

View File

@@ -13,7 +13,7 @@ if ($_POST && $error) {
$query = substr($query, strlen($match[0]));
} elseif (preg_match("~$delimiter|['`\"]|\$~", $query, $match, PREG_OFFSET_CAPTURE, $offset)) {
if ($match[0][0] && $match[0][0] != $delimiter) {
preg_match('~\\G([^\\\\' . $match[0][0] . ']*|\\\\.)+(' . $match[0][0] . '|$)~s', $query, $match, PREG_OFFSET_CAPTURE, $match[0][1] + 1);
preg_match('~\\G([^\\\\' . $match[0][0] . ']+|\\\\.)*(' . $match[0][0] . '|$)~s', $query, $match, PREG_OFFSET_CAPTURE, $match[0][1] + 1);
$offset = $match[0][1] + strlen($match[0][0]);
} else {
$empty = false;