ID:               42298
 Updated by:       [EMAIL PROTECTED]
 Reported By:      matthew-php at dracos dot co dot uk
-Status:           Assigned
+Status:           Closed
 Bug Type:         PCRE related
 Operating System: Windows XP
 PHP Version:      5CVS-2007-08-14 (snap)
 Assigned To:      nlopess
 New Comment:

bug fixed in PCRE 7.3.
I've upgraded the bundled PCRE package in php 5.2 and 6 branches.


Previous Comments:
------------------------------------------------------------------------

[2007-08-15 09:02:22] [EMAIL PROTECTED]

submited upstream: http://bugs.exim.org/580
I will provide more feedback when I end my vacations.

------------------------------------------------------------------------

[2007-08-15 08:43:03] [EMAIL PROTECTED]

Assigned to PCRE maintainer.

------------------------------------------------------------------------

[2007-08-14 16:46:48] matthew-php at dracos dot co dot uk

Description:
------------
When using the /u modifier, preg_match, preg_match_all, and
preg_replace all give incorrect results using /\S{2}/u but work fine
with /\S\S/u which should be equivalent.

Reproduce code:
---------------
$s = "A\xc2\xa3BC";
preg_match_all('/\S\S/u', $s, $m);
print_r($m[0]);
preg_match_all('/\S{2}/u', $s, $m);
print_r($m[0]);


Expected result:
----------------
Array
(
    [0] => A£
    [1] => BC
)
Array
(
    [0] => A£
    [1] => BC
)


Actual result:
--------------
Array
(
    [0] => A£
    [1] => BC
)
Array
(
    [0] => A
    [1] => 
)



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42298&edit=1

Reply via email to