private function matchSubTerms($subSpec)
    {
        if (preg_match('/(?<![\\\\\$])[\{\}]/', $subSpec, $_error, PREG_OFFSET_CAPTURE)) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SS.
                InvalidMARCspecException::ESCAPE,
                $subSpec
            );
        }

        if (preg_match_all('/'.$this->SUBTERMS.'/', $subSpec, $_subTermMatches, PREG_SET_ORDER)) {
            if (empty($_subTermMatches[0]['operator'])) {
                $_subTermMatches[0]['operator'] = '?';
            }
            if (!$_subTermMatches[0]['rightsubterm']) {
                throw new InvalidMARCspecException(
                    InvalidMARCspecException::SS.
                    InvalidMARCspecException::MISSINGRIGHT,
                    $subSpec
                );
            }

            return array_filter($_subTermMatches[0], 'strlen');
        } else {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SS.
                InvalidMARCspecException::UNKNOWN,
                $subSpec
            );
        }
    }
private function matchSubTerms($subSpec)
    {
        if (preg_match('/(?<![\\\\\$])[\{\}]/', $subSpec, $_error, PREG_OFFSET_CAPTURE)) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SS.
                InvalidMARCspecException::ESCAPE,
                $subSpec
            );
        }

        if (preg_match_all('/'.$this->SUBTERMS.'/', $subSpec, $_subTermMatches, PREG_SET_ORDER)) {
            if (empty($_subTermMatches[0]['operator'])) {
                $_subTermMatches[0]['operator'] = '?';
            }
            if (!$_subTermMatches[0]['rightsubterm']) {
                throw new InvalidMARCspecException(
                    InvalidMARCspecException::SS.
                    InvalidMARCspecException::MISSINGRIGHT,
                    $subSpec
                );
            }

            return array_filter($_subTermMatches[0], 'strlen');
        } else {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SS.
                InvalidMARCspecException::UNKNOWN,
                $subSpec
            );
        }
    }
private function matchSubTerms ( $ subSpec ) { if ( preg_match ( '/(?<![\\\\\$])[\{\}]/' , $ subSpec , $ _error , PREG_OFFSET_CAPTURE ) ) { throw new InvalidMARCspecException ( InvalidMARCspecException :: SS . InvalidMARCspecException :: ESCAPE , $ subSpec ) ; } if ( preg_match_all ( '/' . $ this -> SUBTERMS . '/' , $ subSpec , $ _subTermMatches , PREG_SET_ORDER ) ) { if ( empty ( $ _subTermMatches [ 0 ] [ 'operator' ] ) ) { $ _subTermMatches [ 0 ] [ 'operator' ] = '?' ; } if ( ! $ _subTermMatches [ 0 ] [ 'rightsubterm' ] ) { throw new InvalidMARCspecException ( InvalidMARCspecException :: SS . InvalidMARCspecException :: MISSINGRIGHT , $ subSpec ) ; } return array_filter ( $ _subTermMatches [ 0 ] , 'strlen' ) ; } else { throw new InvalidMARCspecException ( InvalidMARCspecException :: SS . InvalidMARCspecException :: UNKNOWN , $ subSpec ) ; } }
Parses a single SubSpec into sunTerms.

@param string $subSpec A single SubSpec

@return array subTerms as array
Parses a single SubSpec into sunTerms .