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
On Sat, 01 Aug 2009 01:37:56 +0300, Paul Halliday
wrote:
Actually, I don't think that regexp's are very slow :)
But I haven't tested them from that perspective.
You should just benchamrk different approaches :)
btw, not sure that substr will help you a lot:
first you have to get a begining
I was trying to stay away from regex as much as possible due to the
overhead? I might be wrong here.
This script will be parsing a lot of requests/sec. Thousands, maybe
more, which it also needs to toss into a DB. I want to try and keep it
as fast as possible. This is tricky when you don't know wh
On Sat, 01 Aug 2009 00:22:21 +0300, 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
...
Why not just use regexp ?
For example:
$string = "long text.. multiply lines...
[21/Jul/20
4 matches
Mail list logo