for using split, try to remove the ( ) since you will not be needing $1
through $9. I suspect because you have many ( ) in there, this might
cause a problem. I also gather that you are trying not to really split,
but to pattern match, in which case you can only have from $1-$9 (i
belive that is correct, however i could have have misread).

Do try to consolodate your ( ), and not use it for sections that you do
not need it.
combine the time and date into one ( ), you can parse that later need
be. You don't need -offset do you? if you do, then put that into the
time as well. After you've combined the ( ) as best you can, perhaps it
will work.

you might also consider using the *? (look forward/look back) method of
doing things.
for instance \"(.*)?\" will match "METHID URI HTTP/1.x" (without quotes
of course). That should help you a bit.

-Akshay

Katie Elliott wrote:
> 
> Hi,
> I am trying to split apart a log file.  However, it doesn't seem to be working.  Can 
>anyone give me some help?  I am still trying to figure out how split works.  It seems 
>to work up to the browser, but after that I seem to be having trouble.
> 
> Thanks in advance,
> Katie
> ---------------
> ipaddr - user [dd/Mon/yyyy:hh:mm:ss -offset] "METHOD URI HTTP/1.x" respcode bytes 
>"referrer" "browser" METHOD REQUEST "HTTP/1.x" cookie1=value1
> 
> '^(\S+) (\S+) (\S+) \[(\d\d)\/(\S\S\S)\/(\d\d\d\d):(\d\d):(\d\d):(\d\d) (\S+)\] 
>\"(\S+) ([^"]*)\" (\S+) (\S+) \"?(
> [^"]*)\"\s*\"([^"]*)\" (\S+) ([^"])\" (\S+)'
> __________________________________________________________________
> Get your own FREE, personal Netscape Webmail account today at 
>http://webmail.netscape.com/

--
http://www.5vs1.com - A Pearl Jam Fan Site

"Only when the last tree is dead, the last river damned, and the last
field paved, will we realize that we can't eat money."

"Time is long and life is short, so begin to live while you still can."
                        -Eddie Vedder

Reply via email to