Doesn't this do what you want?
#! perl -slw use strict; while ( <DATA> ) { chomp; if ( $_ !~ m[/user/prot/$] ) { print qq{Disallow!! [$_]}; } else { print qq{Allowed. [$_]}; } } __DATA__ /user/prot/ /user/protrusions/ /user/a/ /user/backups
Output
P:\test>test2 Allowed. [/user/prot/] Disallow!! [/user/protrusions/] Disallow!! [/user/a/] Disallow!! [/user/backups]
In reply to Re: Negative Lookahead using negated character classes?
by BrowserUk
in thread Negative Lookahead using negated character classes?
by Wonko the sane
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |