if (($_ =~ m/match string/i) && ($_ !~ m/does not match string/i)) {

Works flawlessly, thanks allot... 

--
Chris


Quoting Shashidhara Bapat <[EMAIL PROTECTED]>:

> Hi,
> 
> yes you can do that. For "not match", you got to use "!~".
> 
> - shashi
> 
> On 5/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> >   if ($_ =~ m/match string/i) {
> >     if ($_ =~ m/does not match string/i) {
> >     } else {
> >       print $_;
> >
> > Regex is not my strong point, so I'm going to ask...  Is there any way to
> > write
> > that better?  Preferably only using one if statement?
> >
> > if (($_ =~ m/match string/i) && ($_ =~ m/does not match string/i)) {
> >   print $_;
> >
> > I'm not to sure how to do the reverse of =~ for the does not match part...
> >
> > Thanks,
> > Chris
> >
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > <http://learn.perl.org/> <http://learn.perl.org/first-response>
> >
> >
> >
> 




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to