Hi,
I am trying to create a regular expression that has a few
requirements.
1. The data must all digits
2. The data must be 9 digits in length
3. The data cannot have 9 zero's. ex: '000000000'
I have 2 issues:
I am having problems trying to check for a total of 9 zeros.
My all
zero check does not work. It will fail if there is a zero
anywhere in
the data. Not sure how to specify 9 zero total.
I read in an tutorial that I could use '&&'
intersection operation. So
I was trying to check for 9 digits AND not 9 zeros. But
when I test
the expression, it seems it does not recognize the
intersection.
I can't figure it out.
Does any one know if this is possible to handle with regular
expressions or has another idea to handle the expressions?
Thanks!
|