regular expressions help please

From: Date: Tue, 30 Apr 2002 08:31:46 +0000
Subject: regular expressions help please
Groups: php.general 
Request: Send a blank email to php-general+get-95335@lists.php.net to get a copy of this message
I'm trying to find files in my array for example ="lg_imode.gif" and ="/db/imodeklein/edgar-IMODE-1-.gif" I want to differentiate between the files with slash at the front and ones without so that I can add a server path ! but as usual I' m having problems with the correct regex At the moment I've got this to find files with forward slash eregi_replace("([^\"]+[/+]+[a-z_/-]+[gif]+[/$])" , and it seems to work.(although I think it's wrong) And I'm trying this to find the files without the slash at the front eregi_replace("([^\"]+(a-z_)+[gif]$)" , which is definately not working. ....help !

« previous php.general (#95335) next »