mardi 4 août 2015

Regex for number range from 0 to 31 excluding preceding zeros

I have written regex from numbers from 0 to 31. It shall not allow preceding zeros.

[0-2]\\d|/3[0-2]

But it also allows preceding zeros.

01 invalid
02 invalid

Can some tell me how to fix this.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire