I need your help with this one. I have to form a regex that accepts only 8 digits (no letters) with no or less than 3 dashes.
It should accept these examples:
12345678
1234 5678
1234-5678
123-45-678
12-345-678
It should not accept these examples:
1234 (less than 8 digits)
123456789 (more than 8 digits)
-12345678-
!@@#$%
12ABCBDEF (with letters)
12-34-56-78 (more than 3 dashes)
Any help is appreciated.