I need to write a regex that checks if a phrase contains a positive number. I have found this:
[1-9]\d* (left|remaining).*$
But it does not work on negative numbers. So I want to check if the words "left" or "remaining" follows a positive number. These are the test cases
0 left
1 left
2 left
3 left
0 remaining
1 remaining
2 remaining
you have 3 left
(13 left)
there are 12 remaining today
You have (-12 left) today
There are (3 left)
-15 remaining today
you have -24 left today