in reply to How can I extract the expression between two key words
You could try
$line =~ m/0\s+(.+?)\s+SUBCASE/; my $expr = $1; [download]
Or
my $expr = substr( $line, 4, 40 ); [download]
If the format is truely as fixed as it appears from your limited sample.