|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17761 $regs[] above 10, fails in Windows
Submitted: 2002-06-14 09:10 UTC Modified: 2002-06-15 16:49 UTC
From: michael at thingmand dot dk Assigned:
Status: Closed Package: Regexps related
PHP Version: 4.2.1 OS: Windows 2000
Private report: No CVE-ID: None
 [2002-06-14 09:10 UTC] michael at thingmand dot dk
The "$regs will be filled with exactly ten elements, even though more or fewer than ten parenthesized substrings may actually have matched" problem with ereg(), is showing on Windows boxes - also above version 4.1.0.

The same script, tested on a Unix box worked as suspected.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-14 11:33 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2002-06-14 15:29 UTC] michael at thingmand dot dk
When I use ereg()'s possibility to capture the matches with $reg[] and make an expression with 10+ matches, it won?t capture matches above $reg[9].

On the other hand, if I make 9 or less matches, the $reg[] always count 10 entries ($reg[0]- $reg[9]).

The error only appears on Windows systems ? on Unix systems, the bug is fixed?

Just as described in the note on
 [2002-06-14 15:55 UTC]
Just in case this is already fixed..can you try this snapshot:
 [2002-06-15 16:49 UTC] michael at thingmand dot dk
>Just in case this is already fixed..

Works here - thx!
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 05:01:29 2024 UTC