perl --

What an amazing coincidence ... Your parents named you in an idiosyncratic
way which, amazingly, matches the language about which you now ask a question!


...and then perl said...
% 
% Please help me parse this www.mydomain.com to just mydomain.com 
...

You've seen the replies noting that stripping to the last two values can
cause you problems.  How often will your subdomains ("station" in the
example below) be the same (or do you not care about uniqueness, as for
all of the stations in the fire.org domain)?  I have found it generally
useful to simply strip off a www. if present and then strip off the next
dot and beyond to return 

  mydomain
  yourdomain
  station
  
in your examples.

If that doesn't work for you, then you might be able to get away with a
TLD listing (.com et al + .us, .ca, .uk) and perhaps common sub-TLDs
under those (.co for .uk, for example) and go from there.


HTH & HAND

:-D
-- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to