Tell me how to check the number from 2 to infinity?
^category/page-(?P<page>[0-9]+)$ That is, if in the line page-0 or page-1 then this should not fit the regular schedule.
Tell me how to check the number from 2 to infinity?
^category/page-(?P<page>[0-9]+)$ That is, if in the line page-0 or page-1 then this should not fit the regular schedule.
Use
^category/page-(?![01]$)(?P<page>[0-9]+)$ ^^^^^^^^^ See the regular expression demo .
If the numbers of type 001 should be filtered, add 0* -> (?!0*[01]$) .
^category/page-(?!0*[01]$)(?P<page>[0-9]+)$ ^^ A template (?![01]$) is a forward preview block that does not return a match if immediately after the current position (ie, after the hyphen) is 0 or 1 ( [01] ), followed immediately by the end of the line ( $ ). 0* finds zero and more characters 0 .
([3-9]|\d{2,}) - teranSource: https://ru.stackoverflow.com/questions/811606/
All Articles