Re: Regular expression help

From: Date: Tue, 25 Nov 2003 23:29:14 +0000
Subject: Re: Regular expression help
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-170958@lists.php.net to get a copy of this message
* Thus wrote Matthias Nothhaft (php@mahono.de): > Hi, > > ^ inside [] means "not the following chars", so your expression means: > > if ($val contains no space " ", no tab "\t" and no newline "\n") > { > //do the job ... > } That's not necessarily the correct assesment. rather: if ($val has any character but ' ', '\t', or '\n') { // do the job. } with: " test\t\n" because 'test' is in there it results a a true statement. Curt -- "My PHP key is worn out" PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/

« previous php.general (#170958) next »