develooper Front page | perl.beginners | Postings from November 2009

Regular expressions question

Thread Next
From:
mangled_us@yahoo.com
Date:
November 18, 2009 07:29
Subject:
Regular expressions question
Message ID:
190b52dd-30c1-4c68-b282-c01bc618b956@f16g2000yqm.googlegroups.com
Hi,

Can anyone tell me hoq to write a regular expression which matches
anything _except_ a litteral string ?

For instance, I want to match any line which does not begin with
Nomatch.  So in the following :

Line1 xxxx
Line2 yyyy
Nomatch zzzz
Line3 aaaa
Line 4 bbbb

I would match every line except the one containing "Nomatch zzzz"

Many thanks,

David


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About