Hi Jay,
I have a file with MapRef field filled. Based on this field I calculate APN in the whole file by some algorithm (different function for each town). So, I scan the file and calculate APN for each record. I also want to perform some validation during this loop. I don't want to use RegExp, because it would be much slower, than native VFP functions. I like Sergey's idea. It's simple and doesn't require lots of changes in the current ValidateAPN1 function. His idea could be further simplified, because case 3 could be checked chrtran(lcAPNUniform,'X','9')=chrtran(lcMask,'X','9') since the previous case already checks for difference...
If it's not broken, fix it until it is.
My Blog