I need a regex that will accept all paths except those that have /cantbe
or /cantbe/this
So
this/is/ok/filename.tr
is a match but
this/is/ok/cantbe/filename.tr
or
this/is/ok/cantbe/this/filename.tr
are not matches.
I tried
.*(?!\/cant\/)(?!\/cant\/this).*\.tr
but the paths above are still matches