<pre>package main import ( "fmt" "regexp" ) func main() { match, err := regexp.MatchString(`\([^()]+\)`, `((x))`) if err != nil { panic(err) } if !match { fmt.Println("should match, does not") } }</pre>