|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-05-18 18:52 UTC] kamarton at gmail dot com
Description:
------------
The regular expression engine with 'u' modifiers '\w' class not include few hungarian characters.
Not include: ő, ű, Ő and Ű.
PHP source file coding in utf8 with BOM.
Sorry my english.
Regards,
Marton
System:
WinXP, SP2
PHP 5.2.5 (xampp version)
(source editor: Notepad++ v4.9.2.)
Reproduce code:
---------------
echo preg_replace('/\w/u','_','???ő???ű????Ő???Ű?');
Expected result:
----------------
echo -> '__________________'
Actual result:
--------------
echo -> '___ő___ű____Ő___Ű_'
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 22:00:01 2025 UTC |
Reproduce code: --------------- echo preg_replace('/\w/u','_','???ő???ű????Ő???Ű?'); Expected result: ---------------- echo -> '__________________' Actual result: -------------- echo -> '___ő___ű____Ő___Ű_'