I have this very long JSON string. I would like to filtrate it and only get the data between the first bracket. The problem is, I have many other brackets therefore my regex pattern is not working properly. 

Here is the JSON string:

```
    String jsondata = "["
    +"{"
      +  "test: 63453645"
        +"date: 2016-07-17"
       "{"
        + "id:534534"
        +"}"
      + "blank : null"
      + "flags : null"
     + "}"
    +"{"
      +  "test: 543564236"
        +"date: 2014-07-17"
        +"{"
        + "id:6532465"
        +"}"
      + "blank : null"
      + "flags : null"
    + "}"
    +"]";

    pattern = "\\{[^{}]*\\}";
    pr = Pattern.compile(pattern);  
    math = pr.matcher(jsondata);
    if (math.find()) {
        System.out.println(math.group());
    }
    else
        System.out.println("nomatch");

```

The problem with the pattern that I have is that it only prints out to the first `}` after the `id:`, but I want it to end at the last `}` which is after flags: null.

And I only want to print the first match, i.e not the string after because the also start and end with the same character, and that is why I have an if statement instead of a while loop.

Any suggestions? Thank you!

Regex with multiple brackets seems like a very difficult task. Can I match the last string instead? Starting from `{` to `flags : null`?