code: func selectString(s, spec string) bool {
  	if spec == "*" {
  		return true
  	}
  	if !strings.Contains(spec, "*") {
  		return s == spec
  	}
  
  	pos := 0
  	match := true
  	parts := strings.Split(spec, "*")
  	for i, part := range parts {
  		if len(part) == 0 {
  			continue
  		}
  		next := strings.Index(s[pos:], part)
  		switch {
  		// next part not in string
  		case next < pos:
  			fallthrough
  		// first part does not match start of string
  		case i == 0 && pos != 0:
  			fallthrough
  		// last part does not exactly match remaining part of string
  		case i == (len(parts)-1) && len(s) != (len(part)+next):
  			match = false
  			break
  		default:
  			pos = next
  		}
  	}
  	return match
  }
docs: // selectString returns true if the provided string matches spec, where spec is a string with
  // a non-greedy '*' wildcard operator.
  // TODO: turn into a regex and handle greedy matches and backtracking.