#49399 [Asn]: mb_ereg_replace() '\b' fails with mbstrings

From: Date: Sun, 13 Dec 2009 20:32:39 +0000
Subject: #49399 [Asn]: mb_ereg_replace() '\b' fails with mbstrings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145703@lists.php.net to get a copy of this message
 ID:               49399
 Updated by:       jani@php.net
 Reported By:      manfred at mabuweb dot com
 Status:           Assigned
 Bug Type:         mbstring related
 Operating System: linux
-PHP Version:      5.2.11
+PHP Version:      5.2.10
 Assigned To:      moriyoshi
 New Comment:

I can't:

# php -v
PHP 5.2.12RC2-dev (cli) (built: Nov 22 2009 02:36:43)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
# php t.php
Días
Días




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

[2009-12-13 20:32:12] manfred at mabuweb dot com

I've no 5.3 version to try, but I just tried in 5.2.11 and can
reproduce the error.

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

[2009-12-13 19:32:46] felipe@php.net

I can reproduce it only in 5.2.

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

[2009-08-28 13:17:16] manfred at mabuweb dot com

Description:
------------
mb_ereg_replace() and mb_eregi_replace() misinterpretate MBchars as
word end.

Reproduce code:
---------------
  $pattern = '\bas\b';
  $string = 'Días';
  echo $string.'<br/>';
  echo mb_ereg_replace($pattern,  '', $string);


Expected result:
----------------
Días
Días


Actual result:
--------------
Días
Dí



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


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



Thread (8 messages)

« previous php.bugs (#145703) next »