Try this:
^[1-9][0-9]?$
The ?
means that the previous token is optional.
The ^
and $
are anchors for the start and end of the string respectively.
solved Regular expression for 1 or more [closed]
Try this:
^[1-9][0-9]?$
The ?
means that the previous token is optional.
The ^
and $
are anchors for the start and end of the string respectively.
solved Regular expression for 1 or more [closed]