in reply to How do I match a string that is NOT at the end of a line?
Use the dot metacharacter. eg:
use strict; use warnings; use Test::More tests => 2; ok ("bar foo" =~ /foo/, 'Foo matched at end'); ok ("bar foo" !~ /foo./, 'Foo not matched at end');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I match a string that is NOT at the end of a line?
by Anonymous Monk on Jun 29, 2015 at 13:20 UTC |