perl -ne 'my $string="perlmonks"; if (/$string/) { if (!/$&$/) { print } }'
If you have a match before the end and at the end you will have to define what do you want
Regards, In reply to Re: How do I match a string that is NOT at the end of a line?
by i5513
in thread How do I match a string that is NOT at the end of a line?
by davidfilmer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |