I have a text file, which is strucutred as following:

```
segmentA {
   content Aa
   content Ab
   content Ac
    ....
}

segmentB {
   content Ba
   content Bb
   content Bc
   ......
}

segmentC {
  content Ca
  content Cb
  content Cc
  ......
}

```

I know how to search certrain strings through the whole text file, but how can i define to search for a certain string whithin, like example, "segmentC". I need something like reg expression to tell the script??: 

If text beginn with "segmentC {" perform a search of a certain string until the first "}" appears.

Someone an idea?

Thanks in advance!