I do the processing of addresses for the site.
There is a line (url) of the form:
site.ru/novosti/page-2/ There is a first expression: #^/novosti/page-([0-9]+)/# , which catches the URL and processes it.
But there is another priority rule that does not allow the first to work.
The second expression: #^/novosti/#
The task in theory is simple (as far as I understand this business) - to add an exception to the second expression so that the first one could quietly work out. Roughly speaking, if in the second expression after the last slash there are " page- " characters + any number up to a thousand, then such an expression should return false or simply not work.