Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Regex guru required with regex helpRegex guru required with regex help
Previous
 
Next
New Post
9/29/2009 7:12 AM
 

I implemented this method to validate a comma-delimitered email list.

Basically, it splits up the list by "," and then validates each email against a RegEx expression (much like the RegEx .net validator). It uses this expression: "\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"

BUT.. it lets through this: (I used this tester)

"email@domain.com   email@domain.net"

If a user did not put the , in it takes that as one email and it passes the validation above. If you put this into a textbox with the core regex validator then it fails, so I think it is something to do with the matching options.

 if (emailRegEx.IsMatch(address)) return true;

So I want to either change the expression to catch this "email@domain.com   email@domain.net" OR I want to change the method options to tell it to fail if there is more than one match in an instance. 
How do I do this?

Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
10/21/2009 8:30 PM
 

The solution is here.

I am so impressed with StackOverflow - this was causing me problems for several weeks and within a few hours of posting it on SO they posted the solution. Great for technical problems (DNN or not).


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Regex guru required with regex helpRegex guru required with regex help


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out