I have a regular expression that matches strings that start with either the word "db" or the word "admin":
/^\/(db|admin)\//
I'm refactoring my code and my requirements have changed: Now I need the opposite, i.e. a regular expression that matches strings that don't start with one of those two words. Is this possible with regular expressions?
Note: I cannot use JS API - the regular expression is inserted in Express.js's app.all(path, callback)
method directly (as the path
).