Regressions ... #3380 #3194 ab9217e316a79bc8fab2840c8f5bd2b9bc7a4dc0
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 0b47073..7c3df42 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1461,7 +1461,7 @@
 	 */
 	protected function _has_operator($str)
 	{
-		return (bool) preg_match('/(<|>|!|=|\sIS\s|\sEXISTS|\sBETWEEN|\sLIKE|\sIN\s*\(|\s)/i', trim($str));
+		return (bool) preg_match('/(<|>|!|=|\sIS NULL|\sIS NOT NULL|\sEXISTS|\sBETWEEN|\sLIKE|\sIN\s*\(|\s)/i', trim($str));
 	}
 
 	// --------------------------------------------------------------------
@@ -1485,7 +1485,8 @@
 				'\s*(?:<|>|!)?=\s*',		// =, <=, >=, !=
 				'\s*<>?\s*',			// <, <>
 				'\s*>\s*',			// >
-				'\s+IS(?:\sNOT)?(?:\sNULL)?',	// IS[ NOT] NULL
+				'\s+IS NULL',			// IS NULL
+				'\s+IS NOT NULL',		// IS NOT NULL
 				'\s+EXISTS\s*\([^\)]+\)',	// EXISTS(sql)
 				'\s+NOT EXISTS\s*\([^\)]+\)',	// NOT EXISTS(sql)
 				'\s+BETWEEN\s+\S+\s+AND\s+\S+',	// BETWEEN value AND value
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 6214806..1c0aed6 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -672,7 +672,7 @@
 				// value appears not to have been set, assign the test to IS NULL
 				$k .= ' IS NULL';
 			}
-			elseif (preg_match('/\s*(!?=|<>)\s*$/i', $k, $match, PREG_OFFSET_CAPTURE))
+			elseif (preg_match('/\s*(!?=|<>|IS(?:\s+NOT)?)\s*$/i', $k, $match, PREG_OFFSET_CAPTURE))
 			{
 				$k = substr($k, 0, $match[0][1]).($match[1][0] === '=' ? ' IS NULL' : ' IS NOT NULL');
 			}
@@ -2319,7 +2319,7 @@
 
 				// Split multiple conditions
 				$conditions = preg_split(
-					'/(?!<[\'"].*)(\s*AND\s+|\s*OR\s+)(?!.*[\'"])/i',
+					'/(\s*AND\s+|\s*OR\s+)/i',
 					$this->{$qb_key}[$i]['condition'],
 					-1,
 					PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY