ID: 6680
Updated by: sander
Reported By: [EMAIL PROTECTED]
Status: Open
Old Bug Type: *Regular Expressions
Bug Type: Feature/Change Request
Operating System: FreeBSD 4.1-RELEASE
PHP Version: 4.0.1pl2
New Comment:

Moved to feature request.

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

[2000-09-17 16:30:36] [EMAIL PROTECTED]

You may want to use PCRE extension - it supports locale settings.

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

[2000-09-12 05:54:33] [EMAIL PROTECTED]

<?php
 
if(eregi("^[[:alnum:]]+$",$t1)) {
  printf("alnum<br>");
} else {
  printf("not alnum<br>");
}
 
?>

when invoked with $t1=<some string in cyrillic koi8-r encoding> (example - "вася") and 
correct locale settings (see below) prints "not alnum"

while at the command line grep -E with the same input matches:

    -------
mbravo@tag-ltd:pages$ grep -E '[[:alnum:]]+'
вася
вася
    -------


PHP configured as - 

'./configure' '--prefix=/opt/www' '--with-apxs=/opt/www/bin/apxs'
'--with-mod_charset' '--with-mysql=/opt' '--with-pgsql=/opt'

posix
Revision                                            $Revision: 1.17 $

LANG  ru_RU.KOI8-R
HTTP_ENV_VARS["LANG"] ru_RU.KOI8-R



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



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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to