On Monday 29 April 2002 20:52, Ford, Mike               [LSS] wrote:
> > -----Original Message-----
> > From: Hugh Bothwell [mailto:[EMAIL PROTECTED]]
> > Sent: 27 April 2002 01:15
> >
> > "Vins" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > > if(!ereg("^#(.)*$", $buffer[$i]))
> > > {
> > >     echo "ok";
> > > }
> > >
> > > what does this mean?
>
> [...]
>
> > Boiled down, it is 'ok' if the string
> > doesn't start with '#'.
>
> Um -- I'm no regex expert, but isn't ^ the "start of string" character? --
> so this is looking for strings which *do* begin with a hash!

Well the ereg is looking for strings beginning with # but then the whole if 
expression is negated (!), so the statement "it is 'ok' if the string doesn't 
start with '#'" is correct.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
When it comes to broken marriages most husbands will split the blame --
half his wife's fault, and half her mother's.
*/

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

Reply via email to