But it will not work if the line is "logfile= filename", Is there any way for this particular case to specify there could be zero or one occurrence of comma. Thanks for your help$line="logfile = filename , abcd=eflk , cxd"; $line=~/logfile\s*=\s*(.*?),/$1/; $file=$1;
In reply to perl string extract by anu_1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |