in reply to regex and getpwent()...

I am not sure that m// match empty ("") value. It matches everything.

BobiOne KenoBi ;)

Replies are listed 'Best First'.
Re: Re: regex and getpwent()...
by japhy (Canon) on May 28, 2001 at 05:25 UTC
    It only matches everything until you've matched anything. (Think that's cryptic?)
    for (qw( a b403 c<<>_# d84930 e89293->><{}W )) { print if //; } "foo" =~ /foo/; for (qw( a b403 c<<>_# d84930 e89293->><{}W )) { print if //; }


    japhy -- Perl and Regex Hacker
      Ouch! That's quite nasty looking...
      Looks like I really need to get my head around regular expressions a bit better! 8)

      Thanks for the help.