When you work with URLs, you might want to extract domains (for example, to match web visits to a list of domains that signify a certain type of browsing behaviour). By “domain”, people usually refer to the second-level domain (SLD) plus the top-level domain (TLD). For example, in www.example.com, the…