So 'lv...' matches with 'lvabc' which I dont want.Another way is to split 'fstab' line and directly check 2nd argument.But If how can I do it with regular expression? 'index' function also doesn't solve the purpose.$line="/dev/mapper/VGNEW1-Lv2 /volumes/VGNEW1/lvabc ext3 rw,grpquota,u +srquota,acl 0 0"; if($line =~ m/\/volumes\/VGNEW1\/lv.../) { ...some code }
In reply to Matching exact string by himanshu.padmanabhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |