protected function parseNegativeNotation(
        $string,
        $n_sign = null,
        $n_sign_position = 1
    ) {
        $lc = $this->getLocaleInfo();

        $negative = false;

        if ($n_sign == '') {
            if ($lc['negative_sign'] == '') {
                $negative_sign = '-';
            } else {
                $negative_sign = $lc['negative_sign'];
            }
        } else {
            $negative_sign = $n_sign;
        }

        // filter out all chars except for digits and negative formatting chars
        $char_class = '0-9' . preg_quote($negative_sign, '/');
        if ($n_sign_position === 0) {
            $char_class = '()' . $char_class;
        }
        $exp = '/[^' . $char_class . ']/u';
        $filtered = preg_replace($exp, '', $string);

        if ($filtered != '') {
            if ($filtered[0] === '-' || mb_substr($filtered, -1) === '-') {
                // always allow parsing by negative sign
                $negative = true;
                $string = str_replace($negative_sign, '', $string);
            } elseif (
                $n_sign_position === 0 &&
                $filtered[0] === '(' &&
                mb_substr($filtered, -1) === ')'
            ) {
                // parse parenthetical negative shown as: (5.00)
                $negative = true;
                $string = str_replace(array('(', ')'), '', $string);
            }
        }

        if ($negative) {
            $string = '-' . $string;
        }

        return $string;
    }