Re: Regular expression help
| From: | Ben | Date: | Tue, 25 Nov 2003 21:30:10 +0000 |
| Subject: | Re: Regular expression help | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-170942@lists.php.net to get a copy of this message | ||
Thanks Bronislav for your answer but this can't be it as the following test
code passes validation:
<?Php
$val = "\t test \n";
if(ereg("[^ \t\n]",$val)) {
echo 'In here!!';
}
echo '<BR>' . nl2br($val);
?>
Anyone has an idea?
"Bronislav kluèka" <Bronislav.Klucka@pro2-soft.com> wrote in message
news:PCEBLPFDMGFMKAIKPBIFCEIECNAA.Bronislav.Klucka@pro2-soft.com...
> This condition is true if there is no space, new line or tabulator in $val
> >
> > I need someone to tell me exactly what this regular-expression means:
> > if(ereg("[^ \t\n]",$val)) {
> > // do the job here
> > }
> >
> > I'm looking for an intermittent bug, and I need to understand this to
make
> > sure I have found the bug.
> >
> > Thanks
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> S pozdravem
> Bronislav Klucka
>
> ----------------------------=[
pro2-soft.com ]=----------------------------
> Bronislav Klucka
Pro2-Soft
> +420 605 582 922
Bronislav.Klucka@pro2-soft.com
>
> * Windows & Web applications, Computer training
http://pro2-soft.com
> --------------------------------------------------------------------------
-