I want my RegEx to work both on server and client side (with javascript) I'm decorating my ViewModels like this:
[Display(Name = ConstantKeys.ValidationMessage_Gender_Name)]
[Required(ErrorMessage = ConstantKeys.ValidationMessage_Gender_Required)]
[RegularExpression(RegExKeys.Gender, ErrorMessage = ConstantKeys.ValidationMessage_Gender_RegEx)]
But I don't know if it's possible to use RegexOptions.IgnoreCase for the RegularExpression attribute...
How can I write a regular expression that matches these:
word1|wORD2|wOrD3 ...
(I want the regular expression to still be human readable) Thanks in advance.
CLARIFICATION: I want to match ANY words (not just word1-3) better example:
Man1|woMAN2|MoNkEY3