code: func getRegionInURL(urlStr string) string {
  	fields := strings.Split(urlStr, "/")
  	for i, v := range fields {
  		if v == "regions" && i < len(fields)-1 {
  			return fields[i+1]
  		}
  	}
  	return ""
  }
docs: // getRegionInURL parses full resource URLS and shorter URLS
  // https://www.googleapis.com/compute/v1/projects/myproject/regions/us-central1/subnetworks/a
  // projects/myproject/regions/us-central1/subnetworks/a
  // All return "us-central1"