Since everyone else seems to be releasing free/not quite free Google SERP ranking trackers, in the spirit of “what the hell they’ll change the code tomorrow anyway”, here’s the (Perl) regular expression I’ve been using for my own Google SERP tracker:
[perl]while ($content =~ m{
(.*?).*?
.*?<(?:font size=-1|div class=(?:sml|std))>(?:((?:\w|).*?)
.*?)?(.*?)(?:
[/perl]
Of course it’s up to you to figure out the rest of the code surrounding the regex
Will Google ever stop this madness by actually creating a decent API to their results pages?
Update: Aargh – thanks to Wordpress’s impossible handling of smart-quotes, that code is broken by the smart quotes peppered throughout it – do a search and replace to fix that…
Tags: Google, regex, regular expression, serps
Actually, I haven’t yet decided if I’ll charge for my tool or not. It’s free for now, at least
Fun what you can do with regular expressions.
Eric
aka “The Toolinator”
Very true – your link text has now been swapped around with Joost’s, which is charged for
FYI The link above to the “not quite free” product is unavailable. I found a tool at http://www.digitalpoint.com/tools/keywords/ haven’t tested it yet gotta get my google API which somehow dissappeared from the site I need to get rankings on.