lib/Jejik/MT940/Parser/PostFinance.php
protected function contraAccountNumber(array $lines)
    {
        if (!preg_match('/\n(\d{8})\d{7}(\d{8})/', $lines[0], $match)) {
            return null;
        }

        $date = substr($match[1], 2);
        $number = $match[2];

        if (preg_match(sprintf('/%sCH%s/', $date, $number), $lines[1])) {
            return $number;
        }

        return null;
    }
protected function contraAccountNumber(array $lines)
    {
        if (!preg_match('/\n(\d{8})\d{7}(\d{8})/', $lines[0], $match)) {
            return null;
        }

        $date = substr($match[1], 2);
        $number = $match[2];

        if (preg_match(sprintf('/%sCH%s/', $date, $number), $lines[1])) {
            return $number;
        }

        return null;
    }
Get the contra account number from a transaction

@param array $lines The transaction text at offset 0 and the description at offset 1
@return string|null