I'm trying to match:
/app /app/ /app/**
but not:
/app**
The trailing slash should be optional. I can't quite get it to work.
^/app/([^/]*)/? matches /app/ and /app/**, but not /app.
^/app/([^/]*)/?
/app/
/app/**
/app