473,513 Members | 2,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Email validation using Regular Expression

H
i need to validate a textBox.text containing a email address
the enterd email address text into the textbox needs to be validated for correct forma
example : xy*@abcd.co
how to validate whether a string or text enterd into a textBox is a valid email format r not

-----------need hel
-------seash
Nov 15 '05 #1
3 26315
look at www.regexplib.com
hope it helps
[]´s
Lafayette
"seash" <an*******@discussions.microsoft.com> wrote in message
news:EB**********************************@microsof t.com...
Hi
i need to validate a textBox.text containing a email address.
the enterd email address text into the textbox needs to be validated for correct format example : xy*@abcd.com
how to validate whether a string or text enterd into a textBox is a valid email format r not?
-----------need help
-------seash

Nov 15 '05 #2
seash wrote:
Hi
i need to validate a textBox.text containing a email address.
the enterd email address text into the textbox needs to be validated
for correct format example : xy*@abcd.com
how to validate whether a string or text enterd into a textBox
is a valid email format r not?


The ASP.NET RegEx validator has some predefined validations. For internet
e-mail it has the following regex:

\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
--
Tom Porterfield
MS-MVP MCE
http://support.telop.org

Please post all follow-ups to the newsgroup only.
Nov 15 '05 #3
N.K
Heres the one I use, I got it from
http://www.breakingpar.com/bkp/home....256C40004CC8C6
string regex = @"^(([^<>()[\]\\.,;:\s@\""]+(\.[^<>()[\]\\.,;:\s@\""]+)*)|(\"".+\""))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$";
Cheers
Nirmal
"seash" <an*******@discussions.microsoft.com> wrote in message news:<EB**********************************@microso ft.com>...
Hi
i need to validate a textBox.text containing a email address.
the enterd email address text into the textbox needs to be validated for correct format
example : xy*@abcd.com
how to validate whether a string or text enterd into a textBox is a valid email format r not?

-----------need help
-------seash

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3832
by: Geoff Soper | last post by:
I've been looking for a simple way of checking that a string is an e-mail address. I don't need to check if the address exists, just if the format of the string matches. There seem to be lots of...
4
1784
by: VbUser25 | last post by:
Hi Please suggest i think i am doing something wrong. I am calling fucntion test from another function where i am performing all the validations.I want to validate the email id. this is the...
3
2206
by: Mark | last post by:
To validate the length of a multiline textbox, I'm told that I have to use a regular expression validator. The regular expression below limits it to 25 characters in length, but if the user enters...
2
2243
by: Nazir | last post by:
Hi I'm using a regular expression validator, but if spaces are entered, it bypasses the validation! I'm using ^{5,100}$
5
3089
by: Ryan | last post by:
HELLO I am using the following MICROSOFT SUGGESTED (somewhere on msdn) regular expression to validate email addresses however I understand that the RFP allows for "+" symbols in the email address...
35
3320
by: Mika M | last post by:
Simple question: Does Framework (1.1) contain any routine to check entered email-address is valid ? It's quite easy to make own code for that purpose, but why to do if Framework (1.1) contain...
1
1931
by: Jim Dornbush | last post by:
Has anyone seen an updated regex expression from Microsoft for the email validation expression so that single quotes are allowed? I've been using the canned regex for emails, but recently been...
10
30179
by: ll | last post by:
Hi, I currently am using the following regex in js for email validation, in which the email addresses can be separated by commas or semicolons. The problem, however, lies in that I can type two...
2
1743
by: jack | last post by:
Im a new bee in validation Im just in the design phase of the project and not thinking about having a saperate validaion block. Just browsed through validaion block of enterprise library which...
1
1419
by: neoupadhyay | last post by:
Why my regular expression validation is not working Friends I am using asp.net 1.1 and i try to apply regular expression validation. when i run it at my local host its work cool, but when i upload...
0
7260
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7384
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,...
0
7537
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3233
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.