protected static function parseSearch(array $rawSearch) {

        $dtSearch = new DataTablesSearch();

        if (false === static::isValidRawSearch($rawSearch)) {
            return $dtSearch;
        }

        $dtSearch->setRegex(BooleanHelper::parseString($rawSearch[DataTablesSearchInterface::DATATABLES_PARAMETER_REGEX]));
        $dtSearch->setValue($rawSearch[DataTablesSearchInterface::DATATABLES_PARAMETER_VALUE]);

        return $dtSearch;
    }