code: func WhiteList(str, chars string) string {
  	pattern := "[^" + chars + "]+"
  	r, _ := regexp.Compile(pattern)
  	return r.ReplaceAllString(str, "")
  }
docs: // WhiteList remove characters that do not appear in the whitelist.