Restricting remote ssh key commands with a regex?

I am used to restricting remote ssh key commands in the auth keys file but I have an instance where it would be necessary to define a very nice tight regex to allow me to specify a command where only the IP address changes and I cannot predict the IP address in advance.

Any ideas, can this even be done in this way?

I am running various versions of openssh, mainly 4.3 and 4.7, but right up to 5.1.


Hari Sekhon
Always open to interesting opportunities