Foo Ji-Haw wrote:
> I think the tricky part is that spaces may appear within the "..." field. In
> which case the pattern may well be:
> /^"([^"]+)"\s+"([^"]+)"\s+"([^"]+)"\s+"([^"]+)"\s+"([^"]+)"\s+"([^"]+)"\s+"(
> [^"]+)"\s+"([^"]+)"\s+"([^"]+)"\s+"([^"]+)"\s+"([^"]+)"\s+"([^"]+)"\s+$/)
>
> But I'm a rookie on regex, so this may not be optimal.
You're a rookie on posting. Please don't top-post and trim the prior posts.
You can just adjust the split:
foreach (@lines) {
my @flds = split /"\s+"|^"|"$/; # remove "s - column0 will now be empty
if ($flds[6] eq 'pink' and $flds[8] eq 'blue') {
print "found one: $_\n";
}
}
--
,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED]
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs