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

> One could also use a zero-with negative look-ahead assertion:
>
> #!/usr/bin/perl -w
>
> use strict;
>
> while( my $line = <DATA> ){
>   if( $line =~ m/^(?!Nomatch)/ ){
>     print "match: $line";
>   }
>
> }

Thanks a lot for the reply,  that worked perfectly in my application.

David


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to