`host.match(/([^\.]+)\.(mywebmaker|makes)\.org)/)`? We could make the `[^\.]` bit proper wrt to allowed DNS characters, but that's probably going a bit too far.