I have a set of urls :
/products
/categories
/customers
Now say a customers is named john, and I want to help john to reac
This is entirely the wrong way to go about solving the problem, but it is possible to express fixed negative lookaheads without using negative lookaheads. Extra spacing for clarity:
^ (
( $ | [^/] |
/ ( $ | [^pc] |
p ( $ | [^r] |
r ( $ | [^o] |
o ( $ | [^d] |
d ( $ | [^u] |
u ( $ | [^c] |
c ( $ | [^t] |
t ( $ | [^s] ))))))) |
c ( $ | [^au] |
a ( $ | [^t] |
t ( $ | [^e] |
e ( $ | [^g] |
g ( $ | [^o] |
o ( $ | [^r] |
r ( $ | [^i] |
i ( $ | [^e] |
e ( $ | [^s] )))))))) |
u ( $ | [^s] |
s ( $ | [^t] |
t ( $ | [^o] |
o ( $ | [^m] |
m ( $ | [^e] |
e ( $ | [^r] |
r ( $ | [^s] ))))))))))
) .* ) $