TechnoTone
Well-known member
I have a string that must conform to a strict format. The format is as follows:
BBBBCCTTXXX
where
BBBB is a four digit character code
CC is a two digit character code
TT is a two digit alphanumeric code
XXX is an optional three digit alphanumeric code
The whole code is either 8 or 11 characters in length, depending on whether the final three XXXs are included.
The first 6 characters must not contain numbers.
The final 2 or 5 characters (depending on whether its an 8 or 11 length string) can contain numbers though not necessarily.
Nowhere should the string contain anything other than alphanumerics.
Is there an easy way of validating this other than processing the string byte by byte manually?
BBBBCCTTXXX
where
BBBB is a four digit character code
CC is a two digit character code
TT is a two digit alphanumeric code
XXX is an optional three digit alphanumeric code
The whole code is either 8 or 11 characters in length, depending on whether the final three XXXs are included.
The first 6 characters must not contain numbers.
The final 2 or 5 characters (depending on whether its an 8 or 11 length string) can contain numbers though not necessarily.
Nowhere should the string contain anything other than alphanumerics.
Is there an easy way of validating this other than processing the string byte by byte manually?