func (e *groupExtractor) Extract() ([][]byte, error) {
	var current []byte
	lexer := token.NewLexer("ElementExtractor", e.rawDataElementGroup)
	for lexer.HasNext() {
		t := lexer.Next()
		currentType := t.Type()
		if currentType == token.ERROR {
			return nil, fmt.Errorf("%T: SyntaxError at position %d: %q\n(%q)", e, t.Pos(), t.Value(), e.rawDataElementGroup)
		}
		if currentType == token.SEGMENT_END_MARKER || currentType == token.DATA_ELEMENT_SEPARATOR || currentType == token.GROUP_DATA_ELEMENT_SEPARATOR {
			e.elements = append(e.elements, current)
			current = []byte{}
		} else {
			current = append(current, t.Value()...)
		}
	}
	result := make([][]byte, len(e.elements))
	copy(result, e.elements)
	return result, nil
}
// Extract extracts DataElements from the underlying DataElementGroup
Extract extracts DataElements from the underlying DataElementGroup
// Extract extracts DataElements from the underlying DataElementGroup
func (e *groupExtractor) Extract() ([][]byte, error) {
	var current []byte
	lexer := token.NewLexer("ElementExtractor", e.rawDataElementGroup)
	for lexer.HasNext() {
		t := lexer.Next()
		currentType := t.Type()
		if currentType == token.ERROR {
			return nil, fmt.Errorf("%T: SyntaxError at position %d: %q\n(%q)", e, t.Pos(), t.Value(), e.rawDataElementGroup)
		}
		if currentType == token.SEGMENT_END_MARKER || currentType == token.DATA_ELEMENT_SEPARATOR || currentType == token.GROUP_DATA_ELEMENT_SEPARATOR {
			e.elements = append(e.elements, current)
			current = []byte{}
		} else {
			current = append(current, t.Value()...)
		}
	}
	result := make([][]byte, len(e.elements))
	copy(result, e.elements)
	return result, nil
}
func ( e * groupExtractor ) Extract ( ) ( [ ] [ ] byte , error ) { var current [ ] byte lexer := token . NewLexer ( " " , e . rawDataElementGroup ) for lexer . HasNext ( ) { t := lexer . Next ( ) currentType := t . Type ( ) if currentType == token . ERROR { return nil , fmt . Errorf ( " \n " , e , t . Pos ( ) , t . Value ( ) , e . rawDataElementGroup ) } if currentType == token . SEGMENT_END_MARKER || currentType == token . DATA_ELEMENT_SEPARATOR || currentType == token . GROUP_DATA_ELEMENT_SEPARATOR { e . elements = append ( e . elements , current ) current = [ ] byte { } } else { current = append ( current , t . Value ( ) ... ) } } result := make ( [ ] [ ] byte , len ( e . elements ) ) copy ( result , e . elements ) return result , nil }
Extract extracts DataElements from the underlying DataElementGroup
Extract extracts DataElements from the underlying DataElementGroup