Ah... you should have said that. I thought you were referring to where you're getting replies...
Take what I had in the first reply, then put:
if (%country == uk) { [color:blue]code to send data to whois database 1[/color] }
elseif (%country == jp) { [color:blue]code to send data to whois database 2[/color] }
etc.
When it comes back, you're not going to really care where it came back from, probably. So you won't even need groups.