posts - 114, comments - 204, trackbacks - 82

My Links

News

View Anthony Trudeau's profile on LinkedIn

Add to Technorati Favorites

Article Categories

Archives

Post Categories

Image Galleries

Other Links

September 2007 Entries

Example: Regular Expression Alternation
So, the scenario is that you want to do some specific validation or matching, but part of what you're validating or matching will decide how the rest is validated or matched. For example, in my scenario I have a field in the database that will store a report destination in the URI format that can be either for e-mail, FTP, or a file (mailto://, ftp://, or file://). You could create three regular expressions and evaluate each, but that can be klunky especially if you're doing on the fly validation...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Tuesday, September 11, 2007 12:40 PM | Feedback (0) | Filed Under [ .NET ]

Powered by: