func ParseTokensWithRegex(idHeader string, pattern string) ([]string, error) {
	idRegex := *regexp.MustCompile(pattern)
	if !idRegex.MatchString(idHeader) {
		return nil, fmt.Errorf("malformed 'x-identity' header: %s", idHeader)
	}
	matches := idRegex.FindAllStringSubmatch(idHeader, -1)
	return matches[0][1:], nil
}
// ParseTokensWithRegex retrieves the Address that generated the certificate
// and the public ephemeral key from the identity header
ParseTokensWithRegex retrieves the Address that generated the certificate
and the public ephemeral key from the identity header
// ParseTokensWithRegex retrieves the Address that generated the certificate // and the public ephemeral key from the identity header
func ParseTokensWithRegex(idHeader string, pattern string) ([]string, error) {
	idRegex := *regexp.MustCompile(pattern)
	if !idRegex.MatchString(idHeader) {
		return nil, fmt.Errorf("malformed 'x-identity' header: %s", idHeader)
	}
	matches := idRegex.FindAllStringSubmatch(idHeader, -1)
	return matches[0][1:], nil
}
func ParseTokensWithRegex ( idHeader string , pattern string ) ( [ ] string , error ) { idRegex := * regexp . MustCompile ( pattern ) if ! idRegex . MatchString ( idHeader ) { return nil , fmt . Errorf ( " " , idHeader ) } matches := idRegex . FindAllStringSubmatch ( idHeader , - 1 ) return matches [ 0 ] [ 1 : ] , nil }
ParseTokensWithRegex retrieves the Address that generated the certificate
and the public ephemeral key from the identity header
ParseTokensWithRegex retrieves the Address that generated the certificate and the public ephemeral key from the identity header