{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/regex/issues/93","labels_url":"https://api.github.com/repos/rust-lang/regex/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/regex/issues/93/comments","events_url":"https://api.github.com/repos/rust-lang/regex/issues/93/events","html_url":"https://github.com/rust-lang/regex/issues/93","id":89926245,"number":93,"title":"be more liberal with escape sequences in the parser","user":{"login":"kzvezdarov","id":1070962,"avatar_url":"https://avatars.githubusercontent.com/u/1070962?v=3","gravatar_id":"","url":"https://api.github.com/users/kzvezdarov","html_url":"https://github.com/kzvezdarov","followers_url":"https://api.github.com/users/kzvezdarov/followers","following_url":"https://api.github.com/users/kzvezdarov/following{/other_user}","gists_url":"https://api.github.com/users/kzvezdarov/gists{/gist_id}","starred_url":"https://api.github.com/users/kzvezdarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzvezdarov/subscriptions","organizations_url":"https://api.github.com/users/kzvezdarov/orgs","repos_url":"https://api.github.com/users/kzvezdarov/repos","events_url":"https://api.github.com/users/kzvezdarov/events{/privacy}","received_events_url":"https://api.github.com/users/kzvezdarov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/regex/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/rust-lang/regex/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-21T15:50:22Z","updated_at":"2015-06-22T01:39:23Z","closed_at":null,"body":"A bit of background: I'm trying to implement the BrowserScope user agent parser as seen here: https://github.com/ua-parser/uap-core/. The regular expression below can be found here: https://github.com/ua-parser/uap-core/blob/master/regexes.yaml#L17\r\n\r\nThe crate (0.1.38) encounters an error compiling the following regex:\r\n```\r\n/((?:Ant-)?Nutch|[A-z]+[Bb]ot|[A-z]+[Ss]pider|Axtaris|fetchurl|Isara|ShopSalad|Tailsweep)[ \\-](\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?\r\n```\r\nwith the following error:\r\n```\r\nSyntax(Error { pos: 92, surround: \"p)[ \\\\-](\\\\d\", kind: UnrecognizedEscape('-') })'\r\n```\r\n\r\nTo reproduce:\r\n```\r\nuse regex::Regex;\r\nlet re = Regex::new(r\"/((?:Ant-)?Nutch|[A-z]+[Bb]ot|[A-z]+[Ss]pider|Axtaris|fetchurl|Isara|ShopSalad|Tailsweep)[ \\-](\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?\").unwrap();\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/regex/issues/comments/113979571","html_url":"https://github.com/rust-lang/regex/issues/93#issuecomment-113979571","issue_url":"https://api.github.com/repos/rust-lang/regex/issues/93","id":113979571,"user":{"login":"BurntSushi","id":456674,"avatar_url":"https://avatars.githubusercontent.com/u/456674?v=3","gravatar_id":"","url":"https://api.github.com/users/BurntSushi","html_url":"https://github.com/BurntSushi","followers_url":"https://api.github.com/users/BurntSushi/followers","following_url":"https://api.github.com/users/BurntSushi/following{/other_user}","gists_url":"https://api.github.com/users/BurntSushi/gists{/gist_id}","starred_url":"https://api.github.com/users/BurntSushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BurntSushi/subscriptions","organizations_url":"https://api.github.com/users/BurntSushi/orgs","repos_url":"https://api.github.com/users/BurntSushi/repos","events_url":"https://api.github.com/users/BurntSushi/events{/privacy}","received_events_url":"https://api.github.com/users/BurntSushi/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T01:39:23Z","updated_at":"2015-06-22T01:39:23Z","body":"@kzvezdarov I'm kind of curious how the [Go implementation is working](https://github.com/ua-parser/uap-go/blob/master/uaparser/parser.go), since it also doesn't support arbitrary lookahead: http://play.golang.org/p/KkJw-Y2HYh --- The implementation linked should panic if it sees such a regexp."}}