Yeah, I must admit I misunderstood what exactly you are looking for.. The fact you are 'comparing' domain names only changes a lot.
Well, at least you could filter all of domains you have in database and and for the ones that have 1 dot (no subdomains and no .com.au like domains) in the host name run the script - #1 at
http://pl.php.net/manual/pl/function.parse-url.php
Maybe thats not much but I guess it would save you shitload of work anyway; rest would have to be done by hand...