tags:

views:

54

answers:

1

If alphanumeric all numbers can't be 9's.

If lengh of the string 7 must be 1 alpha + 6 numeric.

+1  A: 

UPDATED: For the first part

if alphanumeric all numbers can't be 9's

and seeing that A999999 is not possible. It should not match this

[a-zA-Z]{1,2}[^9]{6}

but it should match this.

[a-zA-Z]{1,2}[0-9]{6}
why not \w{1}[0-9]{6} ?
owca
I think \w: includes letters, hypens and apostrophes. Hypens and apostrophes are not alphabetical letters.