develooper Front page | perl.perl5.porters | Postings from March 2013

Re: Is this a /^*/ bug?

Thread Previous
March 25, 2013 16:00
Re: Is this a /^*/ bug?
Message ID:
Tom Christiansen wrote:
>I realize this is nonsense, but I wonder if it is not a bug.  Shouldn't the
>overall pattern still fail, not succeed?

No, the behaviour looks correct to me.  /^*/ will match beginning-of-line
zero or more times.  In your example, the pattern matches completely
when this repetition count is zero: it's not matching beginning-of-line,
but you didn't require it to.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About