code: func subPat(text, mtype string, pat *regexp.Regexp) string {
  	canidates := []string{}
  	for _, s := range pat.FindAllString(text, -1) {
  		canidates = append(canidates, strings.TrimSpace(s))
  	}
  	r := punctuationReplacer{
  		matches: canidates, text: text, matchType: mtype}
  	return r.replace()
  }
docs: // subPat replaces all punctuation in the strings that match the regexp pat.