There is issue with Java Regex.

File contains some SQL queries in the following format:

```
query_name_1 {
  any single line or multi line sql query
}

query_name_2 {
  any single line or multi line sql query
}

...

query_name_n {
  any single line or multi line sql query
}

```

Query name can contain only uppercase and lower letters , number and underscore. SQL query must be inside curly bracket and should not be parsed for validation. Brackets must be on same line with query name or lower. Queries must be splitted with any space symbol.

I tried to use regex placed below but had no success.

```
[a-zA-Z_]+(\s*|\n*)\{.*\}

```

Please post any suggestion how to fix it.