Re: reg-ex again
| From: | Jason Wong | Date: | Mon, 29 Apr 2002 08:30:07 +0000 |
| Subject: | Re: reg-ex again | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95109@lists.php.net to get a copy of this message | ||
On Monday 29 April 2002 15:22, John Fishworld wrote:
> 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
Assuming that all those files which have a '/' at the front already have a
valid path, and thus it is only those without a '/' that needs a path, then
wouldn't it be far simpler to just check the first character to see whether
it is a '/' and act accordingly?
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
<< WAIT >>
*/