|
Posted by jamen on 12/16/05 06:16
swpulitzer@yahoo.com wrote:
> please tell me why in the world this statement
>
> ereg( '[\w]{1,10}', 'abcdef' );
>
> always returns false? Thanks.
>
Because 'abcdef' neither contains a 'w' or '\' character
Try looking into the more powerful PCRE functions
I'll bet you'll find that \w works here
$ok = preg_match('#[\w]{1,10}#', "abcdef") == 1;
$ok should be true now
Navigation:
[Reply to this message]
|