Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Pattern problem

by japhy (Canon)
on Jan 27, 2006 at 14:35 UTC ( [id://525986]=note: print w/replies, xml ) Need Help??


in reply to Pattern problem

I'd like to know how you've determined /Host System (?!#)/ doesn't work. It should work fine.
while (<FH>) { print if /^Host System (?!#)/; # or perhaps for more whitespace safety # print if /^Host\s+System\s+(?![#\s])/ }

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Replies are listed 'Best First'.
Re^2: Pattern problem
by Anonymous Monk on Jan 27, 2006 at 14:50 UTC
    Hmm this is both embarrasing and interesting at the same time. I've just redone my tests and it does work using
    /Host System (?!#)/
    Most people seem to have suggested that it shouldn't do though based on the previous answers ??

      Nah, they just did the straightforward reply to your OQ "How do I ..." Congrats to japhy for thinking it through.

      Be Appropriate && Follow Your Curiosity

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-26 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found