I need to create a route pattern that match slug but not particular words that consist of only the word or have a trailing slash.
I've tried:
^(?!(admin|blog)).*$
and many various pattern. But still didn't make it.
expected:
admin //not match
blog //not match
blog/ //not match
admin-test //match
test-admin //match
blog-and-blogwalking //match
any-slug //obviously match
I am not quite good in regex things. Hope somebody can help. Thanks.