I'm writing a url rewrite regex to find strings having dash between each slash pair, for example,
/aaa-bb/cc/dd-ee-ff/gg
should match aaa-bb and dd-ee-ff. I need it to match nothing if url contains /test/, so for url /aaa-bb/cc/test/dd-ee-ff/gg, it should match nothing. I have written a regex
/\w+-(\w+(?!\.)-?)+
it will find all strings contains -, but I can't add the pattern for the /test/ part.