|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-11-10 13:28 UTC] hrompik at gmail dot com
Description:
------------
I know English bad, so use a translator.
The problem is that the Russian alphabet - Cyrillic is not properly processed.
Some letters are not included in the set [?-?] example '?' or '?'
Reproduce code:
---------------
<?php
$url = '?-?';
if (ereg("^([?-?]+)-([?-?]+)$",$url)) echo 'yes'; else echo 'no';
?>
Expected result:
----------------
yes
Actual result:
--------------
no
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 05:00:01 2025 UTC |
if (preg_match("/^[?-?]+$/",'????')) echo 'yes'; else echo 'no'; The same problem is not all the characters. displays no and should be yes. To work properly account for the entire alphabet list. For example working properly: if (preg_match("/^[?????????????????????????????????]+$/",'????')) echo 'yes'; else echo 'no';