Although you already mentioned, that your problem is solved, I think this is another solution:
if ( $line =~ m{/volumes/VGNEW1/lv(?!abc)} ) { # your code }
It should match any /volumes/VGNEW1/lv which is not followed by abc. See perlre ('zero-width negative look-ahead assertion') for details.
In reply to Re: Matching exact string
by linuxer
in thread Matching exact string
by himanshu.padmanabhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |