Mailing List Archive

bug? using '?' for minimum match
The following appears to be a bug or limit in perl:

example: /y.*?y/s; print $&;

If a match is greater than about 32k (using '?' for a minimum match) it returns
null, if less than about 32k it works ok.

This is also the case with loops:

while ($text =~ /y.*?y)/sg) {
print $&;
}

Currently running perl 5.001m on SunOS 4.1.3
Re: bug? using '?' for minimum match [ In reply to ]
On Mon, 16 Oct 1995 08:41:11 MDT, frudegej@tcplink.nrel.gov wrote:
>The following appears to be a bug or limit in perl:
>
>example: /y.*?y/s; print $&;
>
>If a match is greater than about 32k (using '?' for a minimum match) it returns
>null, if less than about 32k it works ok.
>
>This is also the case with loops:
>
>while ($text =~ /y.*?y)/sg) {
> print $&;
>}
>

This was reported earlier (NETaa14347) and fixed. The patch (which includes
other fixes) is available as

http://www.perl.com/perl/bugs/NETaa14535-3.html

- Sarathy.
gsar@engin.umich.edu