More reg-ex probs
| From: | John Fishworld | Date: | Mon, 29 Apr 2002 20:51:38 +0000 |
| Subject: | More reg-ex probs | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95255@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 !
thanks !