|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-03-08 14:28 UTC] runesk at radar dot no
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 13 03:00:02 2026 UTC |
<?php $foo = "???"; if(preg_match("/\w+/", $foo, $bar)) { echo "preg_match default locale => Match\n"; } else { echo "preg_match default locale => No Match\n"; } if(ereg("[[:alnum:]]+", $foo, $bar)) { echo "ereg default locale => Match\n"; } else { echo "ereg default locale => No Match\n"; } setlocale("LC_CTYPE", "no_NO"); if(preg_match("/\w+/", $foo, $bar)) { echo "preg_match no_No locale => Match\n"; } else { echo "preg_match no_No locale => No Match\n"; } if(ereg("[[:alnum:]]+", $foo, $bar)) { echo "ereg no_No locale => Match\n"; } else { echo "ereg no_No locale => No Match\n"; } ?> produses following output: preg_match default locale => No Match ereg default locale => No Match preg_match no_No locale => Match ereg no_No locale => No Match