Accept RegExp object for hostname