#37250 [NEW]: Regular expresion /i modifer bag

From: Date: Sun, 30 Apr 2006 15:33:04 +0000
Subject: #37250 [NEW]: Regular expresion /i modifer bag
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-96397@lists.php.net to get a copy of this message
From: wise at alego dot org Operating system: Linux 2.6.14-gentoo-r5 PHP version: 5.1.2 PHP Bug Type: Regexps related Bug description: Regular expresion /i modifer bag 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 bug report at http://bugs.php.net/?id=37250&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37250&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37250&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37250&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37250&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37250&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37250&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37250&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37250&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37250&r=support Expected behavior: http://bugs.php.net/fix.php?id=37250&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37250&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37250&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37250&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37250&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37250&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37250&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37250&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37250&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37250&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37250&r=mysqlcfg

« previous php.bugs (#96397) next »