by the way, it's to complicated. the brackets [ and ] are used for
cha-groups. you can leave them for only one char. so this would be the same:
"\\n" (you have to escape the backslash with a backslash)

Curt Zirzow wrote:
> * Thus wrote John W. Holmes ([EMAIL PROTECTED]):
>> [EMAIL PROTECTED] wrote:
>>
>>> who can tell me what's the pattern string mean.
>>> if(ereg("[\\][n]",$username))
>>> {
>>>   /*Do err*/
>>> }
>>
>> It's looking for a \ character or a \ character followed by the
>> letter n anywhere within the string $username.
>>
>
> I hope that isn't looking for a Carriage Return, cause it never
> will...
>
> Just in case it is.... strstr($username, "\n");
>
> Curt



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to