Page 1 of 1

Regex: Search for numbers

Posted: Fri Jul 05, 2019 9:14 pm
by Debugger
For me, this regular expression is incorrect:
^([0]?[1-9])$
^(0?[1-9])$

0? optionally match a zero
[1-9] match one of the characters between 1 and 9


I want the match to be from 01 to 09 -or- 01 to 80


EDIT:

Regex Engine

PCRE: not work
^[0]{1}?[1-9]$

Boost.Regex: work
^[0]{1}?[1-9]$