note 23907 added to function.eregi
| From: | ChrisAndolina at hotmail dot NoSpAm dot com | Date: | Wed, 31 Jul 2002 15:42:18 +0000 |
| Subject: | note 23907 added to function.eregi | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-34049@lists.php.net to get a copy of this message | ||
in the above, i think you can replace "(e){0,1}" with "(e)?" to make it
optional, eh? im not sure if you need parenthesis around it to make it work, but i know it works
with them. also, i think you only need one \ to escape the period.
changing it to:
if (eregi (".+\.(jpe?g|gif|png)$", $filename))
{// This is an imagefile}
i might be wrong, not sure tho.
--
http://www.php.net/manual/en/function.eregi.php
http://master.php.net/manage/user-notes.php?action=edit+23907
http://master.php.net/manage/user-notes.php?action=delete+23907
http://master.php.net/manage/user-notes.php?action=reject+23907