my $foo = $1 if m/^(.+?)\n/; $foo =~ s/Remediation Report(?:\n+)?//;