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