public function process()
    {
        $operands = $this->getOperands();

        if ($operands->containsNull() === true) {
            return null;
        }

        if ($operands->exclusivelySingle() === false) {
            $msg = "The PatternMatch operator only accepts operands with a single cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_CARDINALITY);
        }

        if ($operands->exclusivelyString() === false) {
            $msg = "The PatternMatch operator only accepts operands with a string baseType.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_BASETYPE);
        }

        $rawPattern = $this->getExpression()->getPattern();
        $pattern = OperatorUtils::prepareXsdPatternForPcre($rawPattern);
        $result = @preg_match($pattern, $operands[0]->getValue());

        if ($result === 1) {
            return new QtiBoolean(true);
        } elseif ($result === 0) {
            return new QtiBoolean(false);
        } else {
            $errorType = OperatorUtils::lastPregErrorMessage();
            $msg = "An internal error occured while processing the regular expression '${rawPattern}': ${errorType}.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::RUNTIME_ERROR);
        }
    }