I am sure everybody has had his/her share of regex woes.We have a big application with around 30 developers working on a mvc3 web application , and the two fold regex validations (front-end and server side) is becoming a nightmare to maintain.Is there a way to keep all the regexes in one place ? so that they can be used as attributes for entities and also be used for validations in the controller?
Maintaining Regex in a .net application
asp.net mvc;maintainability;regular expressions
What are you using for validation now? Generally, the default, built-in DataAnnotations do just what you are describing. Another option is FluentValidation which also works with client-side validation. In any case this is a solved problem in general.