Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Regular Expression Help

Reply
Thread Tools

Regular Expression Help

 
 
sam
Guest
Posts: n/a
 
      12-09-2005
Hello,
We have a textbox on a web form (ASP.NET 2.0 - C#) that is for end-users to
enter e-mail address(es). The valid entries are:

http://www.velocityreviews.com/forums/(E-Mail Removed)
(E-Mail Removed);(E-Mail Removed);name3@company. com (notice no space after
the semicolon)
(E-Mail Removed); (E-Mail Removed); (E-Mail Removed) (notice the space
after the semicolon)

Basically, the user can enter 1 e-mail address or more than 1 e-mail address
separated by a semicolon.

Can the RegularExpressionValidator control handle this situation?
If not, is there another way to validate this?

Thanks!


 
Reply With Quote
 
 
 
 
agapeton@gmail.com
Guest
Posts: n/a
 
      12-11-2005
To avoid obfuscating the code, I would do this custom. As in split on
all the e-mail separators (most people allow for space, camma,
semicolor, and new line) and then regexp against each. If one fails,
they all fail.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seek xpath expression where an attribute name is a regular expression GIMME XML 3 12-29-2008 03:11 PM
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C++ 42 11-04-2008 12:39 PM
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C Programming 45 11-04-2008 12:39 PM
Matching abitrary expression in a regular expression =?iso-8859-1?B?bW9vcJk=?= Java 8 12-02-2005 12:51 AM
Dynamically changing the regular expression of Regular Expression validator VSK ASP .Net 2 08-24-2003 02:47 PM



Advertisments