code: func (r RegexpTokenizer) Tokenize(text string) []string {
  	var tokens []string
  	if r.gaps {
  		temp := r.regex.Split(text, -1)
  		if r.discard {
  			for _, s := range temp {
  				if s != "" {
  					tokens = append(tokens, s)
  				}
  			}
  		} else {
  			tokens = temp
  		}
  	} else {
  		tokens = r.regex.FindAllString(text, -1)
  	}
  	return tokens
  }
docs: // Tokenize splits text into a slice of tokens according to its regexp pattern.