#37250 [Opn->Bgs]: Regular expresion /i modifer bag

From: Date: Mon, 01 May 2006 14:53:15 +0000
Subject: #37250 [Opn->Bgs]: Regular expresion /i modifer bag
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-96423@lists.php.net to get a copy of this message
ID: 37250 Updated by: tony2001@php.net Reported By: wise at alego dot org -Status: Open +Status: Bogus Bug Type: Regexps related Operating System: Linux 2.6.14-gentoo-r5 PHP Version: 5.1.2 New Comment: Please report this problem to PCRElib developers. Not PHP issue. Previous Comments: ------------------------------------------------------------------------ [2006-04-30 15:33:04] wise at alego dot org Description: ------------ If regular expresion contains symbols in koi8-r charset, the modifier is ignored. Reproduce code: --------------- $datatext="&#1055;&#1088;&#1080;&#1074;&#1077;&#1090;, &#1101;&#1090;&#1086; &#1087;&#1088;&#1080;&#1084;&#1077;&#1088; &#1082; &#1089;&#1083;&#1086;&#1074;&#1091; '&#1087;&#1088;&#1080;&#1074;&#1077;&#1090;'"; echo preg_replace('/(&#1087;&#1088;&#1080;&#1074;&#1077;&#1090;)/i','<b>${1}</b>',$datatext); Expected result: ---------------- &#1055;&#1088;&#1080;&#1074;&#1077;&#1090;, &#1101;&#1090;&#1086; &#1087;&#1088;&#1080;&#1084;&#1077;&#1088; &#1082; &#1089;&#1083;&#1086;&#1074;&#1091; '<b>&#1087;&#1088;&#1080;&#1074;&#1077;&#1090;</b>' Actual result: -------------- <b>&#1055;&#1088;&#1080;&#1074;&#1077;&#1090;</b>, &#1101;&#1090;&#1086; &#1087;&#1088;&#1080;&#1084;&#1077;&#1088; &#1082; &#1089;&#1083;&#1086;&#1074;&#1091; '<b>&#1087;&#1088;&#1080;&#1074;&#1077;&#1090;</b> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37250&edit=1

« previous php.bugs (#96423) next »