Where could I find a code (javascript would be the best) to strip out the www and second-level domain names from URLs?
Example:
www.ynet.co.il -> ynet (stripped 'co.il' - two tokens) www.nike.com -> nike (stripped 'com' - one token)
etc
As a second best - the full list of second-level domains (preferably in CSV or any other format) will be welcomed as well.