package main import ( "fmt" "regexp" ) func main() { html := `aaaaaaaa aaaaaaaaaaa` re := regexp.MustCompile(`wp-content\/themes\/(.+?)\/`) result := re.FindStringSubmatch(html) if len(result) > 1 { themeName := result[1] fmt.Println(themeName) } else { fmt.Println("Theme name not found") } }