>lcMask = "999999X-X999999X-X999999XX-XX999999X-XXXXXX" >lcAPN = "123456A-B789012C-D345678EF-GH901234I-KLMNOP" > >lcDigits = "0123456789" >lcLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" > > >lcMaskUniform = CHRTRAN( lcMask, lcDigits, REPLICATE("0", 10)) >lcMaskUniform = CHRTRAN( lcMaskUniform, lcLetters, REPLICATE("A", 26)) > > >lcAPNUniform = CHRTRAN( lcAPN, lcDigits, REPLICATE("0", 10)) >lcAPNUniform = CHRTRAN( lcAPNUniform, lcLetters, REPLICATE("A", 26)) > > >RETURN lcAPNUniform = lcMaskUniform >An even better solution is available in the WSH's VBScript.RegExp object, which can construct complex regular expressions and evaluate them on demand, using standard regular expression matching masks. It requires installation of WSH v 2.0; the RegExp object is documented in the WSH docs pertaining to VBScript, and is covered in detail in Wrox Press' "VBScript Programmer's Reference Manual". The masking requirement outlined above is well within the capability of the VBScript.RegExp object's pattern definition capability. I'm not going to write the code to do it, though.