Assuming that you don't mind only accepting ASCII characters (it gets very
scary otherwise), it would look like this:
^[A-Z]{1,2}\d{1,2}$
You need the ^ and $ to match the beginning and end of the text box,
otherwise you can have any number of letters and any number of numbers.
Oh, one more thing, I presume you want it to be case-insensitive, so add
RegexOptions.IgnoreCase as next parameter on the constructor (e.g.
matcher = new Regex("^[A-Z]{1,2}\d{1,2}$", RegexOptions.IgnoreCase)
matcher.IsMatch(string)
> Hi,
> I am having problems with Regular Expression Validation. Can anyone
s> uggest one for the following rules:
> The textbox must contain 1 or 2 letters followed by 1 or 2 numbers
> Thanks
> Sion Edwards