开发者_StackOverflow中文版
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation th
开发者_StackOverflow中文版
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 11 years ago.
I have a expression, i need to validate. I wanna do it using regular expression. Please help.
AAsswwww-11233 (First 2 char are static - then any alphabets only - then hyphen - then only digits.
try
var regex = new Regex(@"^AA[a-zA-Z]+-[0-9]+$");
@"^AA[A-Za-z]+[-]\d+$"
Learn How to Use and Get The Most out of Regular Expressions
精彩评论