Regular Expression Help

  • Thread starter Thread starter sam
  • Start date Start date
S

sam

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:

(e-mail address removed)
(e-mail address removed);[email protected];[email protected] (notice no space after
the semicolon)
(e-mail address removed); (e-mail address removed); (e-mail address 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!
 
One way is to split the text using semi-colon as the separator and then
validate each item using regular expression. Check out www.regexlib.com to
get a reg exp for email validation.

Hope this helps.

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:

(e-mail address removed)
(e-mail address removed);[email protected];[email protected] (notice no space after
the semicolon)
(e-mail address removed); (e-mail address removed); (e-mail address 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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top