|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-30 09:47 UTC] l_done at tiscali dot it
[2009-09-18 19:06 UTC] jani@php.net
[2009-09-26 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 05:00:01 2025 UTC |
Description: ------------ When using alternation in negative lookbehind in a case-insensitive regexp with mb_ereg* functions, if the alternatives are of different lengths, the first alternative is treated in a "case-sensitive" way. Reproduce code: --------------- $text=' aA 1 bBb 2 cCcc 3 dDddd 4 '; $pattern='(?<!aa |bbb |cccc )[1-4]'; mb_ereg_search_init($text,$pattern,'i'); $r=mb_ereg_search_pos(); while ($r!==false) { $match=mb_ereg_search_getregs(); print_r($match); $r=mb_ereg_search_pos(); } Expected result: ---------------- Array ( [0] => 4 ) Actual result: -------------- Array ( [0] => 1 ) Array ( [0] => 4 )