Q:

Find string between two strings

The sample content is given below, I need to get the value between "body{" and "}". I tried with pattern matcher and it is not finding. Can someone help me with this.
body {
font-family: Arial, Helvetica, sans-serif;
font-style: normal;
font-size: 10pt
color: #000000;
}

Here's the code:
String patt1 = "body {";
String patt2 = "}";
Pattern p1 = Pattern.compile(Pattern.quote(patt1) + "(.*?)" + Pattern.quote(patt2));
Matcher m1 = p1.matcher(cssContent);
while (m1.find())
 {
   System.out.println("Mathced string : "+m1.group(1));
 }

A:

Create a Regex pattern for it : 
   String hello = "body {font-family: Arial, Helvetica, sans-serif; font-style: normal; font-size: 10pt color: #000000; }";
   Pattern pattern = Pattern.compile("\\{(.+?)\\}", Pattern.DOTALL | Pattern.MULTILINE);
   Matcher matcher = pattern.matcher(hello);
   if (matcher.find()) {
        System.out.println(matcher.group(1));
    }

