Re: Regular expression help

From: Date: Tue, 25 Nov 2003 21:40:16 +0000
Subject: Re: Regular expression help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-170946@lists.php.net to get a copy of this message
From: "Bronislav Klučka" <Bronislav.Klucka@pro2-soft.com> > > I need someone to tell me exactly what this regular-expression means: > > if(ereg("[^ \t\n]",$val)) { > > // do the job here > > This condition is true if there is no space, new line or tabulator in $val Actually, the regular expression will match anything that is NOT a space, tab, or newline. That's what the ^ character does (negates the matching). So, if $val has anything that is NOT a space, newline, or tab in it, then the ereg() function will return true. ---John Holmes...

« previous php.general (#170946) next »