private function _regexMatch(string $pattern, int &$offset)
    {
        $idx = $offset;
        if (!preg_match($pattern, substr($this->_dn, $idx), $match)) {
            return null;
        }
        $idx += strlen($match[0]);
        $offset = $idx;
        return end($match);
    }
private function _regexMatch(string $pattern, int &$offset)
    {
        $idx = $offset;
        if (!preg_match($pattern, substr($this->_dn, $idx), $match)) {
            return null;
        }
        $idx += strlen($match[0]);
        $offset = $idx;
        return end($match);
    }
private function _regexMatch ( string $ pattern , int & $ offset ) { $ idx = $ offset ; if ( ! preg_match ( $ pattern , substr ( $ this -> _dn , $ idx ) , $ match ) ) { return null ; } $ idx += strlen ( $ match [ 0 ] ) ; $ offset = $ idx ; return end ( $ match ) ; }
Match DN to pattern and extract the last capture group.

Updates offset to fully matched pattern.

@param string $pattern
@param int $offset
@return string|null Null if pattern doesn't match
Match DN to pattern and extract the last capture group .