code: func CompileRegexp(pattern string) (*Regexp, error) {
  	compiled, err := regexp.Compile(pattern)
  	if err != nil {
  		return nil, err
  	}
  	re, err := syntax.Parse(pattern, syntax.Perl)
  	if err != nil {
  		return nil, err
  	}
  	tpl := &template{buffer: new(bytes.Buffer)}
  	tpl.write(re)
  	return &Regexp{
  		compiled: compiled,
  		template: tpl.buffer.String(),
  		groups:   tpl.groups,
  		indices:  tpl.indices,
  	}, nil
  }
docs: // CompileRegexp compiles a regular expression pattern and creates a template
  // to revert it.