str_replace( ' ', '\s+', $words ), Query::MULTIWORD_VERBS ) ); self::$queryVerbRegex = "/^\s*($multiwordVerbsRegex|[a-z]+)/i"; } return preg_match( self::$queryVerbRegex, $sql, $m ) ? strtoupper( $m[1] ) : ''; } /** * @param string $sql * @param string $tablePrefix * @return string|null */ private static function getWriteTable( $sql, $tablePrefix ) { // Regex for basic queries that can create/change/drop temporary tables. // For simplicity, this only looks for tables with sensible alphanumeric names. // Temporary tables only need simple programming names anyway. $regex = << N, # except the ones surrounded by characters, e.g. l10n $sql = preg_replace( '/-?\d++(,-?\d++)+/', 'N,...,N', $sql ); $sql = preg_replace( '/(?