code: func (i *Index) SearchRegexp(re string, threshold int) ([]*Result, error) {
  	matcher, err := regexp.Compile(re)
  	if err != nil {
  		return []*Result{}, err
  	}
  	buf := []*Result{}
  	for k, v := range i.lines {
  		ind := matcher.FindStringIndex(v)
  		if len(ind) == 0 {
  			continue
  		}
  		if score := i.calcScore(ind[0], v); ind[0] >= 0 && score < threshold {
  			parts := strings.Split(k, verSep) // Remove version, if it is there.
  			buf = append(buf, &Result{Name: parts[0], Score: score, Chart: i.charts[k]})
  		}
  	}
  	return buf, nil
  }
docs: // SearchRegexp searches using a regular expression.