M
Mark Rae
Hi,
This time, I'm looking for a regular expression which says "the string must
contain exactly seven or exactly eight digits" e.g.
123456 fails
1234567 passes
12345678 passes
123456789 fails
I've tried this:
\d{7,8}
but that allows 123456789 to pass, presumably because it contains a string
of seven or eight digits...
Is there any way to specifiy a fixed length to validate?
Any assistance gratefully received.
Mark
This time, I'm looking for a regular expression which says "the string must
contain exactly seven or exactly eight digits" e.g.
123456 fails
1234567 passes
12345678 passes
123456789 fails
I've tried this:
\d{7,8}
but that allows 123456789 to pass, presumably because it contains a string
of seven or eight digits...
Is there any way to specifiy a fixed length to validate?
Any assistance gratefully received.
Mark