Flowdock
extract_subdomains(host, tld_length) public

Returns the subdomains of a host as an Array given the domain level.

# Top-level domain example
extract_subdomains('www.example.com', 1) # => ["www"]
# Second-level domain example
extract_subdomains('dev.www.example.co.uk', 2) # => ["dev", "www"]
Show source
Register or log in to add new notes.