Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

accept an email id & validate it .email id should not exceed
25 characters the mail id should contain 3 characters
excluding domain name,@ and .(dot) the last 3 characters
of the domain should be net,com or org

Answer Posted / pankaj jaju

Function IsValidEmail(strEmail)
If Len(strEmail) > 25 Then
IsValidEmail = "Email contains > 25 characters"
ElseIf LCase(Right(strEmail, 4)) <> ".net" AND LCase
(Right(strEmail, 4)) <> ".com" AND LCase(Right(strEmail,
4)) <> ".org" Then
IsValidEmail = "Email contains invalid
domain name. Use only .com or .net or .org domains only"
ElseIf UBound(Split(strEmail,"@")) > 1 Then
IsValidEmail = "@ character is used
multiple time"
ElseIf UBound(Split(strEmail,"@")) < 1 Then
IsValidEmail = "@ character is missing"
Else
IsValidEmail = True
End If
End Function

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of drive object of scripting.filesystemobject class in vbscript?

1041


Mention what is select case statement?

1016


How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.

2187


Explain about .wsf files?

1219


Mention the environments where vbscript could be run?

1298


Mention what is the difference between vbscript and vba?

1116


how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me

14339


how does vb script help in web page designing? explain with example.

2037


Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards

2739


What is the technology used by vb script?

1014


How to take whole text output from screen of Bitmap Application.

2431


By default in vbscript the arguments passed to functions and subroutines are by reference or by value?

1159


Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)

3726


What are the valid scopes of a variable in vbscript?

1146


How are comments handled in the vbscript language?

1052