Hi There,
I have a string. Its acually a web host name (eg. www.example.com)... this can be any valid host name (e.g zap.example-domain.com, www2.examplebla.tv, www.number.2.com etc...).
What i would like to achieve is to try and extract the domain name, minus the .TDL... so in the case of www.example.com, i would get example, and in the case of www.host.example3.co.uk, i would get example3.
What im trying todo is to automactially generate a mysql username for a host, that in MOST cases will be unique.
Any ideas on doing the above or another way to achieve the desired result would be greatly appeciated.
Thanks, SImon