Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: On zero-width negative lookahead assertions

by bronto (Priest)
on Sep 10, 2004 at 14:21 UTC ( #390081=note: print w/replies, xml ) Need Help??


in reply to Re: On zero-width negative lookahead assertions
in thread On zero-width negative lookahead assertions

@ and . must be backslashed

Backslashed: still matches too much

your \s* allows the regexp to match when \s* matches empty string

I know it, I expressely want to match 0 or more spaces before line end

Ciao!
--bronto


In theory, there is no difference between theory and practice. In practice, there is.
  • Comment on Re^2: On zero-width negative lookahead assertions

Replies are listed 'Best First'.
Re^3: On zero-width negative lookahead assertions
by ccn (Vicar) on Sep 10, 2004 at 14:29 UTC

    Note the difference: perl -ne '/^root:(?!\s*admin\@somewhere\.here)/ and print' alliases

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://390081]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2022-01-28 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (72 votes). Check out past polls.

    Notices?