In the nightwatch documentation I can see that there are both the urlContains and urlEquals assertions that can be specified in a nightwatch.js but these do not allow xpath selectors. I have applied the global parameter to use Xpath everywhere (I will explain below) but I am looking for a way to assert (in a fuzzy way) that the URL of the current page matches a pattern.
The reason is that I test on numerous instances of the same application which are distinguished by their subdomain(s). I am attempting to make my test automation run on any of these environments (without having to change or duplicate the tests).