Find all string matches with Regex golang
<p>I am trying to return an array, or slice, with all the matches for a specific regex expression against a string. The string is:</p>

<pre><code>{city}, {state} {zip}
</code></pre>

<p>I want to return an array with all the matches of strings between curly braces. I have tried using the <a href="https://golang.org/pkg/regexp" rel="noreferrer">regexp</a> package to accomplish this but cannot figure out how to return what I am looking for. This is my current code:</p>

<pre><code>r := regexp.MustCompile("/({[^}]*})/")
matches := r.FindAllString("{city}, {state} {zip}", -1)
</code></pre>

<p>But, all it returns is an empty slice every time no matter what I try.</p>