Chris Moore wrote: > I am trying to get my head round tmask > > I want to check a serial number that looks like "ANANNNNNN" (a=alpha > n=number) > > I don't want to install a regex component (sledgehammers and nuts etc) > > Can I use tmask to do this, or is there another component? - I am reading a > html input box, so I can't use a maskedit
The mask would be [a-z][0-9][a-z][0-9][0-9][0-9][0-9][0-9][0-9]. Create the TMask with that string, and then pass your input string to the Matches method. It returns True if the input string matches the mask. You can also do it all in a single call to MatchesMask. -- Rob _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

