Q:

How to match string starting with one of the two specified chars followed by two or more digits

Matches : X23, A4858, A09387373, X90 
Non-matches : G23, X23H, A48B59, A48BA484646 

I came up with the following,
var rex = new Regex(@"^([AX](\d\d)+)");

but this matches X23H, A48B59,A48BA484646 
How do I make sure it's a string starting with either 'A' or 'X' and then followed by two or more digits?

A:

At least n of some pattern can be accomplished by using {n,}. You probably also want to mark the end of the string. Try doing:
var rex = new Regex(@"^([AX]\d{2,})$");

