regular express : how to exclude multiple character groups?
问题 I have a set of urls : /products /categories /customers Now say a customers is named john, and I want to help john to reach his own account page with a shorter url: before : /customers/john after : /john (suppose customer names are unique) I'm trying to figure out a proper regex dispatcher so all customers can have this feature : /marry /james /tony-the-red-beard here is what I got now(in PHP) : '/^\/([^(products|categories|admin)].+)$/' => /customers/$1 This doesn't seem to work. Anybody can