{"action":"created","issue":{"url":"https://api.github.com/repos/hapijs/hapi/issues/2609","labels_url":"https://api.github.com/repos/hapijs/hapi/issues/2609/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/hapi/issues/2609/comments","events_url":"https://api.github.com/repos/hapijs/hapi/issues/2609/events","html_url":"https://github.com/hapijs/hapi/issues/2609","id":89406237,"number":2609,"title":"Pattern \"|\" (or)","user":{"login":"monolithed","id":803674,"avatar_url":"https://avatars.githubusercontent.com/u/803674?v=3","gravatar_id":"","url":"https://api.github.com/users/monolithed","html_url":"https://github.com/monolithed","followers_url":"https://api.github.com/users/monolithed/followers","following_url":"https://api.github.com/users/monolithed/following{/other_user}","gists_url":"https://api.github.com/users/monolithed/gists{/gist_id}","starred_url":"https://api.github.com/users/monolithed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monolithed/subscriptions","organizations_url":"https://api.github.com/users/monolithed/orgs","repos_url":"https://api.github.com/users/monolithed/repos","events_url":"https://api.github.com/users/monolithed/events{/privacy}","received_events_url":"https://api.github.com/users/monolithed/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-18T21:48:34Z","updated_at":"2015-06-18T23:43:54Z","closed_at":"2015-06-18T23:43:54Z","body":"I propose to add a very useful pattern \"|\" (logical or)\r\n\r\n```js\r\n{\r\n\tmethod : 'GET',\r\n\tpath   : '/{bower_components|node_modules}/{file*}',\r\n\thandler: {\r\n\t\tfile: function (request) {\r\n\t\t\treturn request.params.file;\r\n\t\t}\r\n\t}\r\n},\r\n```\r\n\r\nIs equivalent to\r\n\r\n```js\r\n{\r\n\tmethod : 'GET',\r\n\tpath   : '/{bower_components}/{file*}',\r\n\thandler: {\r\n\t\tfile: function (request) {\r\n\t\t\treturn path.join('bower_components', request.params.file);\r\n\t\t}\r\n\t}\r\n},\r\n\r\n{\r\n\tmethod : 'GET',\r\n\tpath   : '/{node_modules}/{file*}',\r\n\thandler: {\r\n\t\tfile: function (request) {\r\n\t\t\treturn path.join('node_modules', request.params.file);\r\n\t\t}\r\n\t}\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/hapijs/hapi/issues/comments/113320036","html_url":"https://github.com/hapijs/hapi/issues/2609#issuecomment-113320036","issue_url":"https://api.github.com/repos/hapijs/hapi/issues/2609","id":113320036,"user":{"login":"hueniverse","id":56631,"avatar_url":"https://avatars.githubusercontent.com/u/56631?v=3","gravatar_id":"","url":"https://api.github.com/users/hueniverse","html_url":"https://github.com/hueniverse","followers_url":"https://api.github.com/users/hueniverse/followers","following_url":"https://api.github.com/users/hueniverse/following{/other_user}","gists_url":"https://api.github.com/users/hueniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/hueniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hueniverse/subscriptions","organizations_url":"https://api.github.com/users/hueniverse/orgs","repos_url":"https://api.github.com/users/hueniverse/repos","events_url":"https://api.github.com/users/hueniverse/events{/privacy}","received_events_url":"https://api.github.com/users/hueniverse/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T23:43:54Z","updated_at":"2015-06-18T23:43:54Z","body":"This syntax is not going to work. You are trying to perform a sort of regex match using a parameter name. The right way to implement this is using params input validation."}}