Re: Translation Request--Altavista Babelfish can't do it
| From: | Hugh Bothwell | Date: | Sat, 27 Apr 2002 00:14:59 +0000 |
| Subject: | Re: Translation Request--Altavista Babelfish can't do it | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94840@lists.php.net to get a copy of this message | ||
"Vins" <vins@webonline.co.za> wrote in message
news:20020426235354.84297.qmail@pb1.pair.com...
> if(!ereg("^#(.)*$", $buffer[$i]))
> {
> echo "ok";
> }
>
> what does this mean?
It takes a string ($buffers[$i]) and tries to
match it with a regular expression. The
expression reads "a string beginning with
any character except '#', followed by 0 or
more of any character to the end of the
string". The number of matches found is
returned, and if the number is 0 ('not not-false'),
it prints "ok".
Boiled down, it is 'ok' if the string
doesn't start with '#'.
At a guess, it looks like someone is
stripping comments from a shell script.