Examples for 'urltools::suffix_extract'


extract the suffix from domain names

Aliases: suffix_extract

Keywords:

### ** Examples


# Using url_parse
domain_name <- url_parse("http://en.wikipedia.org")$domain
suffix_extract(domain_name)
              host subdomain    domain suffix
1 en.wikipedia.org        en wikipedia    org
# Using domain()
domain_name <- domain("http://en.wikipedia.org")
suffix_extract(domain_name)
              host subdomain    domain suffix
1 en.wikipedia.org        en wikipedia    org
## Not run: 
##D #Relying on a fresh version of the suffix dataset
##D suffix_extract(domain("http://en.wikipedia.org"), suffix_refresh())
## End(Not run)

[Package urltools version 1.7.3 Index]