title: Get the array of strings by matching the pattern in the given string
body: <p>I have a pattern <code>@@{}</code> and given a string I need to find out all the strings coming in between the curly braces.</p>
  
  <p>Example : 
  If my string is <code>Hi This is @@{first} and second is @@{second} along with third @@{third} string</code></p>
  
  <p>The output I expect is a string array consisting of elements:   </p>
  
  <pre><code>first   
  second  
  third
  </code></pre>
  
  <p>My Java code for this goes as :           </p>
  
  <pre><code>Pattern p = Pattern.compile("\\@\\@\\{(.+?)\\}");    
  Matcher match = p.matcher("Hi This is @@{first} and second is @@{second} along" +
                            "with third @@{third} string");
  while(match.find()) {
      System.out.println(match.group());   
  }
  </code></pre>
  
  <p>But the output which I am getting is   </p>
  
  <pre><code>@@{first}   
  @@{second}  
  @@{third}
  </code></pre>
  
  <p>Please guide me how to get the desired output and what mistake I am doing</p>