Posted by yawnmoth on 01/19/06 07:36
Say I have the following script:
<?
$string = 'test';
if (eregi("^[a-z0-9| |\,\-\+\.]+$",$string))
{
echo 'matches!';
}
else
{
echo 'no match';
}
?>
Why does $string = 'te\st' yield a match? The ereg expression doesn't
have a \\ in it...
Also, what does | | do? Normally, it'd mean 'or', but inside of []'s?
And two of them?
[Back to original message]
|