Re: Reg Ex

From: Date: Fri, 31 Oct 2008 12:41:10 +0000
Subject: Re: Reg Ex
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-282697@lists.php.net to get a copy of this message
I thought of a couple other ways anyway... basename($file, '.zip') substr($file, 0, -4) On Fri, Oct 31, 2008 at 5:33 AM, Stut <stuttle@gmail.com> wrote: > On 31 Oct 2008, at 12:27, Kyle Terry wrote: > >> I'm horrible with regular expression. I need to match the text before a >> file >> extension. So if the file is called US.123.kyle.20081029.zip, I would then >> need to match US.123.kyle.20081029. >> > > No regex required. Why do people think everything like this needs a regex?? > > http://php.net/pathinfo > > -Stut > > -- > http://stut.net/ > -- Kyle Terry | www.kyleterry.com

« previous php.general (#282697) next »