Base Assumption:
Your text you are trying to match is somehow in one single variable.
$str =~ m/foo\{(.*)\}\;/;
$1 is now going to contain everything between the curly braces. The flaw I see in my own pattern matching is the fact that if you have another "};" along the way you might not have what you are after.
Then again.. you were pretty vague about your specifications... ;-)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Peter L. Berghold --- Peter@Berghold.Net
"Those who fail to learn from history are condemned to repeat it."