i want to validate my zip/postal code. 1st its an alphanum field n should accept 6 chars without space. if length of field is 7, its allow to accept one space, but that time my format of displaying field will get change. it'll show like "XXX XXX"

i need all dis to b done using regular expression.....

plz help me in dis..