I want a regular expression to match on paths containing '/food/' but not '/food/api/':
Right now I'm using this:
/^((?!\/food\/api\/).)*$/
The problem with this is it matches ANY path that doesn't contain '/food/api/'
Behavior I want to achieve:
REGEX MATCHES
example.com/food/
example.com/food/meals
REGEX IGNORES
example.com/food/api/pasta?sauce=true
example.com/food/api/pasta
example.com/food/api/
example.com/meal
example.com/