06-23-2014 07:10 PM
I would very much appreciate your help.
I have a variable that should contain letters and numbers in a predefined combination i.e. XYZ1234 (3letters - any letters and 4 numbers - any numbers)
The problem is that some values they have:
1.- 2 letters (false) and 3 numbers (false)
2. 3 letters (correct) and 3 numbers (false)
3.- sometimes within the 3 letters there is one or more numbers while they shouldn't have been
4. the same applies to letters section ( there are letters instead of numbers
5.-- No letters only numbers --more than 4
I would like to create a variable that will flag each and every discrepancy from the required as above (3 letters+ 4 numbers)
Thanking you in advance.
06-23-2014 07:21 PM
If you don't mind using Perl Regular expression, then it can be as simple as:
INPUT VAR $;