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

Re: [perl #119095] Empty regular expression does not match in somecases

Thread Previous | Thread Next
From:
Zefram
Date:
July 31, 2013 15:14
Subject:
Re: [perl #119095] Empty regular expression does not match in somecases
Message ID:
20130731151349.GJ11327@fysh.org
Paul Johnson wrote:
>            If the PATTERN evaluates to the empty string, the last
>            successfully matched regular expression is used instead.

Addendum, which should probably go in the doc: you can use /(?:)/ to
get an effective empty pattern that will not invoke this magic.

-zefram

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About