somewhat daily mutterings

/Programming/Projects/Gemcast Fix to "Recent Googles" Code

Apparently, google has some other formats for queries in its URL parameters. Sometimes you get an 'as_q=' or 'es_q=' (or even both, apparently). I assume that's from someone filling in the advanced search form. The result of attempting to process queries like this is a blank entry in my list. Because regular expressions aren't great for dealing with n occurences of a given string (or maybe more because my regular expression skills aren't up to it), I decided to put in the following hack:

grep '\.google.*search.*[?&]q=' /var/apache/logs/referer_log

This bit of hackery forces the grep to find only searches that don't use the special query parameters. Cheesy but effective.

Posted: Sun Apr 27 22:16:45 -0700 2003

Thanks for visiting! Send comments to Mike Thomas.

Site 
Meter