php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: michael at thingmand dot dk
New email:
PHP Version: OS:

 

 [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.

Patches

Pull Requests

History

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

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 http://www.php.net/manual/en/function.ereg.php
 [2002-06-14 15:55 UTC] sniper@php.net
Just in case this is already fixed..can you try this snapshot:

http://snaps.php.net/win32/php4-win32-latest.zip
 [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: Sat Dec 21 14:01:32 2024 UTC