code: func NewConstraint(exp string) (*Constraint, error) {
  	sep := ""
  	constraint := &Constraint{}
  
  	switch {
  	case strings.Contains(exp, "=="):
  		sep = "=="
  		constraint.MustMatch = true
  	case strings.Contains(exp, "!="):
  		sep = "!="
  		constraint.MustMatch = false
  	default:
  		return nil, errors.New("constraint expression missing valid operator: '==' or '!='")
  	}
  
  	kv := strings.SplitN(exp, sep, 2)
  	if len(kv) == 2 {
  		// At the moment, it only supports tags
  		if kv[0] != "tag" {
  			return nil, errors.New("constraint must be tag-based. Syntax: tag==us-*")
  		}
  
  		constraint.Key = kv[0]
  		constraint.Regex = kv[1]
  		return constraint, nil
  	}
  
  	return nil, fmt.Errorf("incorrect constraint expression: %s", exp)
  }
docs: // NewConstraint receives a string and return a *Constraint, after checking syntax and parsing the constraint expression.