I am trying to create a regex which would match the word bar except when there is the word foo behind.
I found that negative lookbehind could handle this, but the problem is that there is an arbitrary number of characters belonging to the expression [\s\-/] between foo and bar.
And unfortunately negative lookbehind does not support arbitrary length.
So the pattern (?<!foo[\s\-/]*)bar is not valid.
Do you know a regex technique that can overcome this problem?