in reply to Re: Heuristic for parsing Host name and domain
in thread Heuristic for parsing Host name and domain

Your approach seems to fail for .de in one case and .name, .mobi, .museum in the other case. The only approach is to use a list of known TLDs.

Replies are listed 'Best First'.
Re^3: Heuristic for parsing Host name and domain
by flexvault (Monsignor) on Aug 29, 2011 at 18:16 UTC

    I wasn't trying to be exhaustive. I was showing an approach for what he needed.

    In the context of spam checking, it is the 3 and 5 letter TLDs that are the greatest problems.

    But you are correct!

    "Well done is better than well said." - Benjamin Franklin