Sample input string

```
"Hi ${spurs.stadium[capacity]}" to return "${spurs.stadium[capacity]}"
"Hi ${spurs.stadium}" to return ""
"Hi ${spurs.stadium{capacity}}" to return ""

```

So I am looking for pattern where

1. string starts with `"${spurs."`
2. string must contain after this square brackets which can have any content
3. end with `"}"`

I have tried `const regex = /[$]{spurs.+?[}]/gi` but it doesn't require the square brackets it seems optional. Any ideas?