in reply to perl string extract
If you don't want trailing spaces:
$line =~ /logfile\s*=\s*([^,]*[^,\s])/; [download]