Re: [PHP] Clean break.

2009-08-04 Thread Jim Lucas
Jerry Wilborn wrote: > Am I missing something? Can't this be done quickly/easily with preg_match()? > > if (preg_match('/\[(.*):(.*)\s/U', '[21/Jul/2009:00:00:47 -0300]', > $matches)) { > print "date: {$matches[1]}, time: {$matches[2]}"; > } > > Jerry Wilborn > jerrywilb...@gmail.com > >

Re: [PHP] Clean break.

2009-08-04 Thread Jerry Wilborn
Am I missing something? Can't this be done quickly/easily with preg_match()? if (preg_match('/\[(.*):(.*)\s/U', '[21/Jul/2009:00:00:47 -0300]', $matches)) { print "date: {$matches[1]}, time: {$matches[2]}"; } Jerry Wilborn jerrywilb...@gmail.com On Tue, Aug 4, 2009 at 5:36 AM, Wolf wro

Re: [PHP] Clean break.

2009-08-04 Thread Wolf
Paul Halliday wrote: > Whats the cleanest (I have a really ugly) way to break this: > > [21/Jul/2009:00:00:47 -0300] > > into: > > date=21/jul/2009 > time=00:00:47 > > Caveats: > > 1) if the day is < 10 the beginning of the string will look like > "[1/... > 2) the "-0300" will differ dependin

Re: [PHP] Clean break.

2009-07-31 Thread Phpster
On Jul 31, 2009, at 5:22 PM, Paul Halliday wrote: Whats the cleanest (I have a really ugly) way to break this: [21/Jul/2009:00:00:47 -0300] into: date=21/jul/2009 time=00:00:47 Caveats: 1) if the day is < 10 the beginning of the string will look like "[1/... 2) the "-0300" will d

[PHP] Clean break.

2009-07-31 Thread Paul Halliday
Whats the cleanest (I have a really ugly) way to break this: [21/Jul/2009:00:00:47 -0300] into: date=21/jul/2009 time=00:00:47 Caveats: 1) if the day is < 10 the beginning of the string will look like "[1/... 2) the "-0300" will differ depending on DST or TZ. I don't need it though, it just ha