You can use a regex: `gaUrlUtils.getHostname(url).match(/admin\.ch$/)`