Regular expression, specific string with symbol

Mattwoogssces

New Member
I have the following regular expression in my data annotation:\[code\][RegularExpression(@"test|test2|test3|test4-5", ErrorMessage = "Please select your status.")]\[/code\]I want the value to accept "test4-5", but it doesnt seem to like the dash symbol, how would i make this accept the exact string "test4-5"
 
Back
Top