I'd like to create a regex pattern that matches alphanumeric strings with an optional prefix of "1-1". Valid matches include:
1-1abc123
TestString
12345
And invalid matches include:
1-2abc123
1--1abc123
--something
So far, I've tried the following pattern in C#, but it matches the first two examples of invalid patterns:
const string PATTERN = @"(1-1)?[a-zA-Z0-9]+";
**EDIT: ** This was marked as an exact duplicate of another post, but it's completely different. **EDIT 2: ** Never mind -- this is indeed a duplicate. It would have been nice to get clarification for why it's a duplicate when marking it, but here we are.