Could it be that you're looking for the entire string "CD2" or "CD02" in a capture group? As in:
string input = "CD02";
var labelMatch = Regex.Match(input, "(?:(?:CD|... // edit for brevity
if(labelMatch.Success)
{
string labelText = mediaLabel.Groups[1].Value;
}
You may have made a mistake by using the ?: expression because this tells the regex engine to match the group and then discard it from the capture groups. Some other expressions you might want to consider:
(?:CD|DISC|DISK|PART)(\d\d?) // throws away the label, captures 1 or 2 digits
(?:CD|DISC|DISK|PART)(\d{1,2}) // ~same thing, matches exactly 1 or 2 digits
((CD|DISC|DISK|PART)\d\d?) // captures the whole thing in group 1