$str =~ m/foo\{(.*)\}\;/;