code: func getRegEx(pattern string) *regexp.Regexp {
  	for _, trs := range []struct {
  		old, new string
  	}{
  		{".", `\.`}, // Escape all '.' in the pattern
  		{"(", `\(`}, // Escape all '(' in the pattern
  		{")", `\)`}, // Escape all ')' in the pattern
  		{"*", ".*"}, // Replace a '*' with '.*' that matches zero or more chars
  		{"{", "("},  // Change a '{' to '('
  		{",", "|"},  // Change a ',' to '|'
  		{"}", ")"},  // Change a '}' to ')'
  		{"?", "."},  // Change a '?' to '.'
  	} {
  		pattern = strings.Replace(pattern, trs.old, trs.new, -1)
  	}
  
  	return regexp.MustCompile(pattern)
  }
docs: // getRegEx compiles and returns a regular expression object for the given
  // address `pattern`.