473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Domain Extension doubt

Hi Friends..
please tell me how long a domain name extension can be? i know 3 digit extensions like
.com
.edu
.net
.org
.mil and so on

i also know 2+2 extensions like
co.in
co.uk
co.us and so on

is there any other combinations available?

Thanks...
Feb 8 '08 #1
3 1022
RedSon
5,000 Expert 4TB
Nope, I don't think so.
Feb 8 '08 #2
But what is this website:-( http://www2.austin.cc.tx.us/

I want to exactly retrieve the domain name like "austin" in http://www2.austin.cc.tx.us

yahoo from www.mail.yahoo.com // It is in 2nd position
austin from www2.austin.cc.tx.us // It is in 1st position
abc from www.xyz.qwerty.abc.efg.co.in // It is in 3rd position

is there any methods available in java?

actually now i am using this code

Expand|Select|Wrap|Line Numbers
  1.  private String getDomain(URL url)
  2.      {
  3.          String domain;
  4.          Pattern p = Pattern.compile("[.]");
  5.          String s[]=p.split(url.getAuthority());
  6.          if(s[(s.length-1)].length()==2)
  7.              domain = s[s.length-3];
  8.          else
  9.              domain = s[s.length-2];
  10.          return domain;
  11.      }
but it will work to retrieve domain only for 3digit country specific domain and 2 + 2 country specific domain. please help it is the important part in my project.
Feb 11 '08 #3
RedSon
5,000 Expert 4TB
But what is this website:-( http://www2.austin.cc.tx.us/

I want to exactly retrieve the domain name like "austin" in http://www2.austin.cc.tx.us

yahoo from www.mail.yahoo.com // It is in 2nd position
austin from www2.austin.cc.tx.us // It is in 1st position
abc from www.xyz.qwerty.abc.efg.co.in // It is in 3rd position

is there any methods available in java?

actually now i am using this code

Expand|Select|Wrap|Line Numbers
  1.  private String getDomain(URL url)
  2.      {
  3.          String domain;
  4.          Pattern p = Pattern.compile("[.]");
  5.          String s[]=p.split(url.getAuthority());
  6.          if(s[(s.length-1)].length()==2)
  7.              domain = s[s.length-3];
  8.          else
  9.              domain = s[s.length-2];
  10.          return domain;
  11.      }
but it will work to retrieve domain only for 3digit country specific domain and 2 + 2 country specific domain. please help it is the important part in my project.
Not sure, with out using REGEX it seems very difficult indeed.
Feb 11 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mike Meyer | last post by:
I've got a package that includes an extension that has a number of header files in the directory with the extension. They are specified as "depends = " in the Extension class. However, Distutils...
1
by: Raymond Cheung | last post by:
How do I disable to show xml file content on web browser from across domain. I know we can have some sort of enbcription on the xml file content. I also know that we can use authentication to...
6
by: Alfred Taylor | last post by:
I'm having performance/memory problems using .NET's XslTransform class so I thought I'd give the MSXML object's a whirl. The question I haven't been able to find in these groups is can I use C#...
0
by: Kalash | last post by:
I want to enable frontpage extension but is there anyway to create the frontpage group (admin, advauthor, contributor, etc.) in domain controller (put in active directory) instead of local account?...
0
by: Kermitus | last post by:
Hey I was hoping for a little help. I am a Domain reseller for Aplus.net. The problem is they really don't provide an API to automate Domain searches, registering etc... I see much potential in...
4
by: Jacob JKW | last post by:
Having read the CLJ FAQ and having done extensive Googling, I do understand that in in general cross-domain iframe scripting is not permitted. One issue I have not seen directly addressed, however,...
3
by: aspmonger | last post by:
Hello, I really believe that IE 6 has a new (intentional?) bug that severely limits the capability of dhtml and cross domain scripting. Yesterday, I read an interesting article about the subject and...
6
by: Bart Van der Donck | last post by:
Hello, I'm presenting my new library 'AJAX Cross Domain' - a javascript extension that allows to perform cross-domain AJAX requests. http://www.ajax-cross-domain.com/ Any comments or...
1
by: DGettins | last post by:
Hi, I'm posting this here as this concerns an ASP classic page, and I'm hoping to solve it at the application level. Scenario below. Two servers, 1. SQL server inside our domain. Also has IIS...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.