PDA

View Full Version : parse domain end from email


esthera
02-17-2005, 09:07 PM
I wrote code to parse the domain end (.com,.biz,.org,.co.uk etc..) from an email

code is

email=request.form("email")
emailhost=Mid(email, InStr(Email, "@") + 1)

n=instr(emailhost,".")
response.write emailhost & "<hr>"
domainend=right(emailhost,len(emailhost)-n)
response.write domainend



Now it works except for emails like me@me.me.com with 2 dots -- don't come thorugh as .com but as me.com --

can someone help me edit my script to come up with just the end