|
Posted by Palle Hansen on 01/19/06 10:23
yawnmoth wrote:
> if (eregi("^[a-z0-9| |\,\-\+\.]+$",$string))
> Why does $string = 'te\st' yield a match? The ereg expression doesn't
> have a \\ in it...
To have this expression make sence to me, it should look like
if (eregi("^[a-z0-9 ,+.-]+$",$string)){
'-' should be the first og last character
all the special characters looses their meaning in a character class.
so you acually have 4 maching backslashes in the expression
Navigation:
[Reply to this message]
|