{"action":"opened","issue":{"url":"https://api.github.com/repos/kataras/iris/issues/927","repository_url":"https://api.github.com/repos/kataras/iris","labels_url":"https://api.github.com/repos/kataras/iris/issues/927/labels{/name}","comments_url":"https://api.github.com/repos/kataras/iris/issues/927/comments","events_url":"https://api.github.com/repos/kataras/iris/issues/927/events","html_url":"https://github.com/kataras/iris/issues/927","id":304642176,"number":927,"title":"Router path regexp problem","user":{"login":"yale8848","id":2555005,"avatar_url":"https://avatars1.githubusercontent.com/u/2555005?v=4","gravatar_id":"","url":"https://api.github.com/users/yale8848","html_url":"https://github.com/yale8848","followers_url":"https://api.github.com/users/yale8848/followers","following_url":"https://api.github.com/users/yale8848/following{/other_user}","gists_url":"https://api.github.com/users/yale8848/gists{/gist_id}","starred_url":"https://api.github.com/users/yale8848/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yale8848/subscriptions","organizations_url":"https://api.github.com/users/yale8848/orgs","repos_url":"https://api.github.com/users/yale8848/repos","events_url":"https://api.github.com/users/yale8848/events{/privacy}","received_events_url":"https://api.github.com/users/yale8848/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-13T06:26:29Z","updated_at":"2018-03-13T06:26:29Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"```\r\napp *mvc.Application\r\napp.Router.Get(\"/total/{year:string regexp(\\\\d{4})}\",...)\r\n```\r\nI find this regexp doesn't work and i find code below:\r\n\r\ncore/router/path.go\r\n```\r\nfunc cleanPath(s string) string {\r\n\tif s == \"\" || s == \".\" {\r\n\t\treturn \"/\"\r\n\t}\r\n\r\n\t// remove suffix \"/\"\r\n\tif lidx := len(s) - 1; s[lidx] == '/' {\r\n\t\ts = s[:lidx]\r\n\t}\r\n\r\n\t// prefix with \"/\"\r\n\ts = prefix(s, \"/\")\r\n\r\n\t// remove the os specific dir sep\r\n\ts = strings.Replace(s, \"\\\\\", \"/\", -1)\r\n\r\n\t// use std path to clean the path\r\n\ts = path.Clean(s)\r\n\r\n\treturn s\r\n}\r\n```\r\n`s = strings.Replace(s, \"\\\\\", \"/\", -1)` it will replace the path to `/total/{year:string regexp(/d{4})}` and so the regexp doesn't work, is this a bug?"}}
{"actor":{"display_login":"yale8848"}}