protected function processResponse(HTTP_Request2_Response $response)
    {
        if ($this->responseRegex !== '') {
            $this->regexp->setPattern($this->responseRegex);

            if (!$this->regexp->matches($response->getBody())) {
                throw new BuildException('The received response body did not match the given regular expression');
            } else {
                $this->log('The response body matched the provided regex.');
            }
        }

        if ($this->responseCodeRegex !== '') {
            $this->regexp->setPattern($this->responseCodeRegex);

            if (!$this->regexp->matches($response->getStatus())) {
                throw new BuildException('The received response status-code did not match the given regular expression');
            } else {
                $this->log('The response status-code matched the provided regex.');
            }
        }
    }