www\.example\.* matches
www.example
www.example.
www.example..
www.example...
www.example....
www.example.....
www.example...... etc.
The point here is that either your code has a typo or you're not up to speed on Regular Expressions-- but either way it makes no difference to mod_rewrite because Apache is very very unforgiving. And so are Regular Expressions.
Presumably what you meant was
www\.example\..+
which is still wrong-- but now it's only functionally wrong, not structurally.
:: thinking ::
In htaccess it would be
RewriteCond %{HTTP_HOST} example\.com
RewriteCond %{HTTP_HOST} !^www\.example\.com$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} example\.co\.uk
RewriteCond %{HTTP_HOST} !^www\.example\.co\.uk$
RewriteRule (.*) http://www.example.co.uk/$1 [R=301,L]
et cetera for each of the "good" domains. (I do not know what you do with HTTP 1.0 requests that come through without a domain name-- the ones that usually get covered with
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
but someone else will explain it.)
Do they all live on the same server? That is, will the correctly redirected requests pass through the same config file as the ones that arrive "cold"? This makes a huge difference in how you need to set up the redirects.
How many names are being redirected? If it isn't a vast number, it may be simpler to approach it from the other side:
RewriteCond %{HTTP_HOST} (exaple|exammple|xeample)
RewriteRule (.*) http://www.example.com/$1 et cetera.
That is, instead of excluding the "good" domains you name the "bad" ones.