I have a string E.g 1001, which needs to be exactly 4 chars and can be any combination of 0 and 1, but not all zeros (all ones is ok).
1001
0
1
I thought of:
^[01]{4}$
won't work because it accepts 0000
0000
I will be using PHP or JavaScript to do this.
Aucun commentaire:
Enregistrer un commentaire