title: get domain name from FQDN?
body: <p>I am trying to get the NetBios name from a fully qualified Domain Name...</p>
  
  <p>the user inputs the FQDN and i convert to NetBios name for</p>
  
  <p>eg xyz.test.com (this is just an example, the FQDN an be anything)</p>
  
  <p>to its NetBios (i am not sure if it is called NetBios please feel free to correct me) name 'xyz'.</p>
  
  <p>is there a way to do this..??</p>
  
  <p>thanks</p>
  
  <blockquote>
    <p>understanding part??</p>
  </blockquote>
  
  <p>I am a bit confused with the terms... </p>
  
  <p>we have clients with different FQDNs like <strong>xyz.test.com</strong> or <strong>int.hdsh.local</strong> and so on..</p>
  
  <p>i need to get the domain name out of these so i can form <strong>domain\username</strong></p>
  
  <p>so the above examples look like <strong>xyz\username</strong> and <strong>hdsh\username</strong>..</p>
  
  <p>as we can see the 2nd FQDN has 2nd part as domain.</p>
  
  <p>so i need help is figuring out which is the domain within a FQDN.</p>