private function matchSubSpecs($subSpecs)
    {
        $_subSpecs = [];
        if (!preg_match_all('/'.$this->SUBSPEC.'/U', $subSpecs, $_subSpecMatches, PREG_SET_ORDER)) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SS.
                InvalidMARCspecException::UNKNOWN,
                $subSpecs
            );
        }

        foreach ($_subSpecMatches as $key => $_subSpecMatch) {
            if (array_key_exists(1, $_subSpecMatch) && !empty($_subSpecMatch[1])) {
                $_subSpecs[$key] = preg_split('/(?<!\\\)\|/', $_subSpecMatch[1], -1, PREG_SPLIT_NO_EMPTY);
            } else {
                throw new InvalidMARCspecException(
                    InvalidMARCspecException::SS.
                    InvalidMARCspecException::UNKNOWN,
                    $subSpecs
                );
            }
        }

        return $_subSpecs;
    }
private function matchSubSpecs($subSpecs)
    {
        $_subSpecs = [];
        if (!preg_match_all('/'.$this->SUBSPEC.'/U', $subSpecs, $_subSpecMatches, PREG_SET_ORDER)) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SS.
                InvalidMARCspecException::UNKNOWN,
                $subSpecs
            );
        }

        foreach ($_subSpecMatches as $key => $_subSpecMatch) {
            if (array_key_exists(1, $_subSpecMatch) && !empty($_subSpecMatch[1])) {
                $_subSpecs[$key] = preg_split('/(?<!\\\)\|/', $_subSpecMatch[1], -1, PREG_SPLIT_NO_EMPTY);
            } else {
                throw new InvalidMARCspecException(
                    InvalidMARCspecException::SS.
                    InvalidMARCspecException::UNKNOWN,
                    $subSpecs
                );
            }
        }

        return $_subSpecs;
    }
private function matchSubSpecs ( $ subSpecs ) { $ _subSpecs = [ ] ; if ( ! preg_match_all ( '/' . $ this -> SUBSPEC . '/U' , $ subSpecs , $ _subSpecMatches , PREG_SET_ORDER ) ) { throw new InvalidMARCspecException ( InvalidMARCspecException :: SS . InvalidMARCspecException :: UNKNOWN , $ subSpecs ) ; } foreach ( $ _subSpecMatches as $ key => $ _subSpecMatch ) { if ( array_key_exists ( 1 , $ _subSpecMatch ) && ! empty ( $ _subSpecMatch [ 1 ] ) ) { $ _subSpecs [ $ key ] = preg_split ( '/(?<!\\\)\|/' , $ _subSpecMatch [ 1 ] , - 1 , PREG_SPLIT_NO_EMPTY ) ; } else { throw new InvalidMARCspecException ( InvalidMARCspecException :: SS . InvalidMARCspecException :: UNKNOWN , $ subSpecs ) ; } } return $ _subSpecs ; }
parses subspecs into an array.

@param string $subSpecs One or more subspecs

@return array Array of subspecs
parses subspecs into an array .