in reply to Negative Lookahead using negated character classes?
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]
|
|---|