[CLUE-Tech] Web Statistics Programs

Jed S. Baer thag at frii.com
Wed Mar 17 23:36:14 MST 2004


On Wed, 17 Mar 2004 21:26:44 -0700
David Anselmi <anselmi at anselmi.us> wrote:

> Um, I've never seen anyone use split (or anything like it) for that. 
> Looks like you want more like:
> 
> ($ip, $date, $request) = \
>    $log_entry =~ /([0-9.]*) - - \[([^\]]*)\] "([^"]*)"/

And to think, when I was at the library today, I saw, and decided to skip
checking out, "Mastering Regular Expressions". ;-)

You know, there are people who can just read a line like that, and
understand it right off. Me, I have to get out the book on heiroglyphics
... err, "Programming Perl", and trace it out. Obviously, I don't do a lot
of regex programming.

> so you're using a regex to match the lines and capturing the parts you 
> want.  But looking at production code will get you further than asking 
> me, I think.
> 
> Maybe I've made enough of a mess to prompt a perl guru to speak up ;-)

How can we induce Randall Schwartz to join the list?

jed
-- 
http://s88369986.onlinehome.us/freedomsight/

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier



More information about the clue-tech mailing list