Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
perl -ne '/^root:\s*/ and $_ !~ /admin\@somewhere\.here/ and print' alias That's ok, but I want to understand that blah-blah-look-ahead thing perl -ne '/^root:(?!\s*admin\@somewhere\.here)/ and print' alias This works! But I can't understand why it doesn't work if you put the \s* outside the parens, nor I can understand why it stops working if I put the \s*$ at the end of the regex :-( Thanks a lot Ciao! In theory, there is no difference between theory and practice. In practice, there is. In reply to Re^2: On zero-width negative lookahead assertions
by bronto
|
|