RegEx Problems | need to check number range
I would like a regex that matches a string that ends with digits between the range 0-17
. For example test_1.png
or test_08.png
.
I tried the following:
(.*)_(([0-1]\d|[0-7])).png
but it skips lines with 8
or 9
, i.e. test_9.png
... My string can contain the filename with 0
or without 0
, i.e. test_07.png
or test_7.png
. How do I change my RegEx so that no lines are skipped?
source to share