Routing pattern matching all site pages but excluding panel pages?

Hi,

I’m looking for a routing pattern that match all site pages but not panel pages. I thought I solved it with 'pattern' => '(.+)' but it turned out later during the development that this target even the panel pages which create a conflict with Pedro Borges https://github.com/pedroborges/kirby-page-lock.

Is there anyone here who is a pro at php regex?

I’m not so sure you have to exclude panel pages here, but rather those page-lock routes? Can’t really test this because the page lock plugin throws lots of errors in my console with or without a route.

Thanks for your input. I will try that. Do you know how to exclude patterns with Kirby routing?

Example not working
'pattern' => '(!page-lock)(.*)', // Match all except page-lock

Maybe something like this (not tested):

'pattern' => '(^(?!.*page-lock).+$)',

I suggest that you check your pattern with https://regex101.com

Perfect, it works. I’ll bookmark that link.