What's wrong with this regex (VBScript/Javascript flavor)
- by OtherMichael
I'm trying to run a regular expression in VBA code that uses Microsoft VBScript Regular Expressions 5.5 (should be the same as JavaScript regex)
regex: ^[0-9A-Z]?[0-9A-Z]{3}[A-Z]?([0-9A-Z]{6})-?([0-9])?$
input: X123A1234567
match: 123456
the six characters I'm interested in give a good match of 123456, ignoring the last (check) digit. Perfect.…