{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/183","repository_url":"https://api.github.com/repos/rust-lang-nursery/regex","labels_url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/183/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/183/events","html_url":"https://github.com/rust-lang-nursery/regex/pull/183","id":139759480,"number":183,"title":"Add regex matching for &[u8].","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-03-10T01:57:53Z","updated_at":"2016-03-12T18:14:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang-nursery/regex/pulls/183","html_url":"https://github.com/rust-lang-nursery/regex/pull/183","diff_url":"https://github.com/rust-lang-nursery/regex/pull/183.diff","patch_url":"https://github.com/rust-lang-nursery/regex/pull/183.patch"},"body":"This commit enables support for compiling regular expressions that can\r\nmatch on arbitrary byte slices. In particular, we add a new sub-module\r\ncalled `bytes` that duplicates the API of the top-level module, except\r\n`&str` for subjects is replaced by `&[u8]`. Additionally, Unicode\r\nsupport in the regular expression is disabled by default but can be\r\nselectively re-enabled with the `u` flag. (Unicode support cannot be\r\nselectively disabled in the standard top-level API.)\r\n\r\nMost of the interesting changes occurred in the `regex-syntax` crate,\r\nwhere the AST now explicitly distinguishes between \"ASCII compatible\"\r\nexpressions and Unicode aware expressions.\r\n\r\nThis PR makes a few other changes out of convenience:\r\n\r\n1. The DFA now knows how to \"give up\" if it's flushing its cache too\r\noften. When the DFA gives up, either backtracking or the NFA algorithm\r\ntake over, which provides better performance.\r\n2. Benchmarks were added for Oniguruma.\r\n3. The benchmarks in general were overhauled to be defined in one place\r\nby using conditional compilation.\r\n4. The tests have been completely reorganized to make it easier to split\r\nup the tests depending on which regex engine we're using. For example,\r\nwe occasionally need to be able to write tests specifically for\r\n`regex::Regex` or specifically for `regex::bytes::Regex`.\r\n5. Fixes a bug where NUL bytes weren't represented correctly in the byte\r\nclass optimization for the DFA.\r\n\r\nCloses #85."},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/comments/195782458","html_url":"https://github.com/rust-lang-nursery/regex/pull/183#issuecomment-195782458","issue_url":"https://api.github.com/repos/rust-lang-nursery/regex/issues/183","id":195782458,"user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"created_at":"2016-03-12T18:14:02Z","updated_at":"2016-03-12T18:14:02Z","body":"Awesome, :+1: from me!"}}