I may have left out, that our users can create new sites on their own.
The proposed sollution requires the admin to do that for every user that wants to create a site with a dash in the name.
So, no beer ??
I kept poking through the sources and I found a little piece of code in wp-includes/ms-functions.php:651 that validates the entered name.
$maybe = array();
preg_match( '/[a-z0-9]+/', $blogname, $maybe );
if ( $blogname != $maybe[0] )
$errors->add('blogname', __('Only lowercase letters and numbers allowed'));
I added a dash (-) into the regex (‘/[a-z0-9\-]+/’) and voila, users can now create sites with dashes in the name.
There are two things that concern me though.
First, I’ll forget to redo this little trick after upgrading WordPress to a newer version. To avoid this, do you know of a plugin I could use to manage this?
Second, are you certain that using dashes won’t break anything? Are there other name validity checks elsewhere in the code?