Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!usc!samsung!uunet!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: Bug with regular expressions? (ver 3 patch 44) Message-ID: <1991Mar04.200304.28799@convex.com> Date: 4 Mar 91 20:03:04 GMT References: <16981@venera.isi.edu> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 17 Nntp-Posting-Host: pixel.convex.com From the keyboard of sondeen@venera.isi.edu (Jeff Sondeen): : :The following works without the caret (^) specifying beginning of line; with :the caret, it doesn't match the input (which starts in column 1): : :program: perl -ne 'if (/^\w:/) { print; }' :on input: nope: :gives result: :expected result: nope: :hypothesis: the caret(^) specifying beginning of line is messing up the : regular expression matching :version: This is perl, version 3.0 ... Patch level: 44 Not sure how that's a bug: /\w/ doesn't mean /\w+/, so /^\w/ can be expected to fail on "nope:". --tom