From: Robert Cummings on
Daniel P. Brown wrote:
> On Wed, Jun 16, 2010 at 15:52, Robert Cummings <robert(a)interjinn.com> wrote:
>> Additionally, extracting top level domains is not so simple since it may
>> have 2 or more parts.
>
> *Gasp!* The Great Cummings is.... incorrect.
>
> /me faints.
>
> Actually, ccTLD's are just the very last group of letters. For
> example, .il, .uk, and .br. However, the ICANN, registrar policies,
> or sponsorship requirements for some of them require the use of an SLD
> as well. For example, .co.il, .org.uk, and .com.br, respectively.
> Some ccTLDs offer the SLD options, but don't require them. For
> example, you can register .co.in, .firm.in, .gen.in, or any other
> available SLD+ccTLD, or just the ccTLD .in itself.
>
> Still others have no such requirement or even official SLD
> endorsements, such as good ol' Canada (Land of Clan Cummings),
> Ireland, and here in the US.

Hahah, I can't be right all the time :D I didn't mean to use TLD, I
meant to use domain name, but not including sub-domained names :) I
don't even know what that is rightly called to exclude sub-domains.
Anyways, those, by virtue of your above description can have two or more
parts and there's not a simple way to extract that part without also
extracting the sub-domain portions.

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.
From: Daniel Brown on
On Wed, Jun 16, 2010 at 21:42, Robert Cummings <robert(a)interjinn.com> wrote:
[snip!]
> Anyways, those, by
> virtue of your above description can have two or more parts and there's not
> a simple way to extract that part without also extracting the sub-domain
> portions.

True. Not without some static rules and logic, including
knowledge of which ccTLDs have required or potential country-wide
SLDs. Though I think the solutions provided by yourself, Shawn, and
myself would suffice for most situations. I'm hoping Tedd will share
his as well.

--
</Daniel P. Brown>
daniel.brown(a)parasane.net || danbrown(a)php.net
http://www.parasane.net/ || http://www.pilotpig.net/
We now offer SAME-DAY SETUP on a new line of servers!
From: tedd on
At 10:16 PM -0400 6/16/10, Daniel Brown wrote:
>I'm hoping Tedd will share his as well.

Daniel:

I'm embarrassed to show it -- it's not as slick and condensed as
your's and Rob's

http://www.webbytedd.com/b3/parse-domain-collective/

Please be kind.

However, my code was to do something specific in my mind, namely to
pull out the domains that have specific TLD the user wants, reduce
the domains to their basic form (no sub domains), strip-out any
possible gremlins from the input text, and return no duplicates. I am
NOT saying that yours did anything different -- I'm just saying that
was *my* intent.

Cheers,

tedd

PS: I'm back from a long stretch of seminars on "Asset Protection". I
guess that my asset needs protecting. In any event, I now know more
about the relationships between Corporation, LLC, LP, Trust, and
other such fun matters than anyone should know.

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com