Regex: Search for numbers

General discussion related to "Everything".
Post Reply
Debugger
Posts: 525
Joined: Thu Jan 26, 2017 11:56 am

Regex: Search for numbers

Post by Debugger » Fri Jul 05, 2019 9:14 pm

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]$

Post Reply