my $file = './max/base/file.c: $(ROOT)/../../../api/maX \\'; if ($file =~ /:\s*(.*)/) { print "$1\n"; }