Following would do,
(\w\d\w)( )(\d\w\d)
Sample code here,
String pattern = @"^(\w\d\w)( )(\d\w\d)$";
String input = "A0A 0A0";
Regex objRegEx = new Regex(pattern);
MatchCollection result = objRegEx.Matches(input);
if (result.Count>0)
{
for (int i = 0; i < result.Count; i++)
{
Response.Write(result[i].Value+"<br/>");
}
}
Hope it helps ,
Thanks
Arindam D Tewary