| 1 | 1.12.2 (2025-10-13) |
| 2 | =================== |
| 3 | This release fixes a `cargo doc` breakage on nightly when `--cfg docsrs` is |
| 4 | enabled. This caused documentation to fail to build on docs.rs. |
| 5 | |
| 6 | Bug fixes: |
| 7 | |
| 8 | * [BUG #1305](https://github.com/rust-lang/regex/issues/1305): |
| 9 | Switches the `doc_auto_cfg` feature to `doc_cfg` on nightly for docs.rs builds. |
| 10 | |
| 11 | |
| 12 | 1.12.1 (2025-10-10) |
| 13 | =================== |
| 14 | This release makes a bug fix in the new `regex::Captures::get_match` API |
| 15 | introduced in `1.12.0`. There was an oversight with the lifetime parameter |
| 16 | for the `Match` returned. This is technically a breaking change, but given |
| 17 | that it was caught almost immediately and I've yanked the `1.12.0` release, |
| 18 | I think this is fine. |
| 19 | |
| 20 | |
| 21 | 1.12.0 (2025-10-10) |
| 22 | =================== |
| 23 | This release contains a smattering of bug fixes, a fix for excessive memory |
| 24 | consumption in some cases and a new `regex::Captures::get_match` API. |
| 25 | |
| 26 | Improvements: |
| 27 | |
| 28 | * [FEATURE #1146](https://github.com/rust-lang/regex/issues/1146): |
| 29 | Add `Capture::get_match` for returning the overall match without `unwrap()`. |
| 30 | |
| 31 | Bug fixes: |
| 32 | |
| 33 | * [BUG #1083](https://github.com/rust-lang/regex/issues/1083): |
| 34 | Fixes a panic in the lazy DFA (can only occur for especially large regexes). |
| 35 | * [BUG #1116](https://github.com/rust-lang/regex/issues/1116): |
| 36 | Fixes a memory usage regression for large regexes (introduced in `regex 1.9`). |
| 37 | * [BUG #1195](https://github.com/rust-lang/regex/issues/1195): |
| 38 | Fix universal start states in sparse DFA. |
| 39 | * [BUG #1295](https://github.com/rust-lang/regex/pull/1295): |
| 40 | Fixes a panic when deserializing a corrupted dense DFA. |
| 41 | * [BUG 8f5d9479](https://github.com/rust-lang/regex/commit/8f5d9479d0f1da5726488a530d7fd66a73d05b80): |
| 42 | Make `regex_automata::meta::Regex::find` consistently return `None` when |
| 43 | `WhichCaptures::None` is used. |
| 44 | |
| 45 | |
| 46 | 1.11.3 (2025-09-25) |
| 47 | =================== |
| 48 | This is a small patch release with an improvement in memory usage in some |
| 49 | cases. |
| 50 | |
| 51 | Improvements: |
| 52 | |
| 53 | * [BUG #1297](https://github.com/rust-lang/regex/issues/1297): |
| 54 | Improve memory usage by trimming excess memory capacity in some spots. |
| 55 | |
| 56 | |
| 57 | 1.11.2 (2025-08-24) |
| 58 | =================== |
| 59 | This is a new patch release of `regex` with some minor fixes. A larger number |
| 60 | of typo or lint fix patches were merged. Also, we now finally recommend using |
| 61 | `std::sync::LazyLock`. |
| 62 | |
| 63 | Improvements: |
| 64 | |
| 65 | * [BUG #1217](https://github.com/rust-lang/regex/issues/1217): |
| 66 | Switch recommendation from `once_cell` to `std::sync::LazyLock`. |
| 67 | * [BUG #1225](https://github.com/rust-lang/regex/issues/1225): |
| 68 | Add `DFA::set_prefilter` to `regex-automata`. |
| 69 | |
| 70 | Bug fixes: |
| 71 | |
| 72 | * [BUG #1165](https://github.com/rust-lang/regex/pull/1150): |
| 73 | Remove `std` dependency from `perf-literal-multisubstring` crate feature. |
| 74 | * [BUG #1165](https://github.com/rust-lang/regex/pull/1165): |
| 75 | Clarify the meaning of `(?R)$` in the documentation. |
| 76 | * [BUG #1281](https://github.com/rust-lang/regex/pull/1281): |
| 77 | Remove `fuzz/` and `record/` directories from published crate on crates.io. |
| 78 | |
| 79 | |
| 80 | 1.11.1 (2024-10-24) |
| 81 | =================== |
| 82 | This is a new patch release of `regex` that fixes compilation on nightly |
| 83 | Rust when the unstable `pattern` crate feature is enabled. Users on nightly |
| 84 | Rust without this feature enabled are unaffected. |
| 85 | |
| 86 | Bug fixes: |
| 87 | |
| 88 | * [BUG #1231](https://github.com/rust-lang/regex/issues/1231): |
| 89 | Fix the `Pattern` trait implementation as a result of nightly API breakage. |
| 90 | |
| 91 | |
| 92 | 1.11.0 (2024-09-29) |
| 93 | =================== |
| 94 | This is a new minor release of `regex` that brings in an update to the |
| 95 | Unicode Character Database. Specifically, this updates the Unicode data |
| 96 | used by `regex` internally to the version 16 release. |
| 97 | |
| 98 | New features: |
| 99 | |
| 100 | * [FEATURE #1228](https://github.com/rust-lang/regex/pull/1228): |
| 101 | Add new `regex::SetMatches::matched_all` method. |
| 102 | * [FEATURE #1229](https://github.com/rust-lang/regex/pull/1229): |
| 103 | Update to Unicode Character Database (UCD) version 16. |
| 104 | |
| 105 | |
| 106 | 1.10.6 (2024-08-02) |
| 107 | =================== |
| 108 | This is a new patch release with a fix for the `unstable` crate feature that |
| 109 | enables `std::str::Pattern` trait integration. |
| 110 | |
| 111 | Bug fixes: |
| 112 | |
| 113 | * [BUG #1219](https://github.com/rust-lang/regex/pull/1219): |
| 114 | Fix the `Pattern` trait implementation as a result of nightly API breakage. |
| 115 | |
| 116 | |
| 117 | 1.10.5 (2024-06-09) |
| 118 | =================== |
| 119 | This is a new patch release with some minor fixes. |
| 120 | |
| 121 | Bug fixes: |
| 122 | |
| 123 | * [BUG #1203](https://github.com/rust-lang/regex/pull/1203): |
| 124 | Escape invalid UTF-8 when in the `Debug` impl of `regex::bytes::Match`. |
| 125 | |
| 126 | |
| 127 | 1.10.4 (2024-03-22) |
| 128 | =================== |
| 129 | This is a new patch release with some minor fixes. |
| 130 | |
| 131 | * [BUG #1169](https://github.com/rust-lang/regex/issues/1169): |
| 132 | Fixes a bug with compiling a reverse NFA automaton in `regex-automata`. |
| 133 | * [BUG #1178](https://github.com/rust-lang/regex/pull/1178): |
| 134 | Clarifies that when `Cow::Borrowed` is returned from replace APIs, it is |
| 135 | equivalent to the input. |
| 136 | |
| 137 | |
| 138 | 1.10.3 (2024-01-21) |
| 139 | =================== |
| 140 | This is a new patch release that fixes the feature configuration of optional |
| 141 | dependencies, and fixes an unsound use of bounds check elision. |
| 142 | |
| 143 | Bug fixes: |
| 144 | |
| 145 | * [BUG #1147](https://github.com/rust-lang/regex/issues/1147): |
| 146 | Set `default-features=false` for the `memchr` and `aho-corasick` dependencies. |
| 147 | * [BUG #1154](https://github.com/rust-lang/regex/pull/1154): |
| 148 | Fix unsound bounds check elision. |
| 149 | |
| 150 | |
| 151 | 1.10.2 (2023-10-16) |
| 152 | =================== |
| 153 | This is a new patch release that fixes a search regression where incorrect |
| 154 | matches could be reported. |
| 155 | |
| 156 | Bug fixes: |
| 157 | |
| 158 | * [BUG #1110](https://github.com/rust-lang/regex/issues/1110): |
| 159 | Revert broadening of reverse suffix literal optimization introduced in 1.10.1. |
| 160 | |
| 161 | |
| 162 | 1.10.1 (2023-10-14) |
| 163 | =================== |
| 164 | This is a new patch release with a minor increase in the number of valid |
| 165 | patterns and a broadening of some literal optimizations. |
| 166 | |
| 167 | New features: |
| 168 | |
| 169 | * [FEATURE 04f5d7be](https://github.com/rust-lang/regex/commit/04f5d7be4efc542864cc400f5d43fbea4eb9bab6): |
| 170 | Loosen ASCII-compatible rules such that regexes like `(?-u:☃)` are now allowed. |
| 171 | |
| 172 | Performance improvements: |
| 173 | |
| 174 | * [PERF 8a8d599f](https://github.com/rust-lang/regex/commit/8a8d599f9d2f2d78e9ad84e4084788c2d563afa5): |
| 175 | Broader the reverse suffix optimization to apply in more cases. |
| 176 | |
| 177 | |
| 178 | 1.10.0 (2023-10-09) |
| 179 | =================== |
| 180 | This is a new minor release of `regex` that adds support for start and end |
| 181 | word boundary assertions. That is, `\<` and `\>`. The minimum supported Rust |
| 182 | version has also been raised to 1.65, which was released about one year ago. |
| 183 | |
| 184 | The new word boundary assertions are: |
| 185 | |
| 186 | * `\<` or `\b{start}`: a Unicode start-of-word boundary (`\W|\A` on the left, |
| 187 | `\w` on the right). |
| 188 | * `\>` or `\b{end}`: a Unicode end-of-word boundary (`\w` on the left, `\W|\z` |
| 189 | on the right). |
| 190 | * `\b{start-half}`: half of a Unicode start-of-word boundary (`\W|\A` on the |
| 191 | left). |
| 192 | * `\b{end-half}`: half of a Unicode end-of-word boundary (`\W|\z` on the |
| 193 | right). |
| 194 | |
| 195 | The `\<` and `\>` are GNU extensions to POSIX regexes. They have been added |
| 196 | to the `regex` crate because they enjoy somewhat broad support in other regex |
| 197 | engines as well (for example, vim). The `\b{start}` and `\b{end}` assertions |
| 198 | are aliases for `\<` and `\>`, respectively. |
| 199 | |
| 200 | The `\b{start-half}` and `\b{end-half}` assertions are not found in any |
| 201 | other regex engine (although regex engines with general look-around support |
| 202 | can certainly express them). They were added principally to support the |
| 203 | implementation of word matching in grep programs, where one generally wants to |
| 204 | be a bit more flexible in what is considered a word boundary. |
| 205 | |
| 206 | New features: |
| 207 | |
| 208 | * [FEATURE #469](https://github.com/rust-lang/regex/issues/469): |
| 209 | Add support for `\<` and `\>` word boundary assertions. |
| 210 | * [FEATURE(regex-automata) #1031](https://github.com/rust-lang/regex/pull/1031): |
| 211 | DFAs now have a `start_state` method that doesn't use an `Input`. |
| 212 | |
| 213 | Performance improvements: |
| 214 | |
| 215 | * [PERF #1051](https://github.com/rust-lang/regex/pull/1051): |
| 216 | Unicode character class operations have been optimized in `regex-syntax`. |
| 217 | * [PERF #1090](https://github.com/rust-lang/regex/issues/1090): |
| 218 | Make patterns containing lots of literal characters use less memory. |
| 219 | |
| 220 | Bug fixes: |
| 221 | |
| 222 | * [BUG #1046](https://github.com/rust-lang/regex/issues/1046): |
| 223 | Fix a bug that could result in incorrect match spans when using a Unicode word |
| 224 | boundary and searching non-ASCII strings. |
| 225 | * [BUG(regex-syntax) #1047](https://github.com/rust-lang/regex/issues/1047): |
| 226 | Fix panics that can occur in `Ast->Hir` translation (not reachable from `regex` |
| 227 | crate). |
| 228 | * [BUG(regex-syntax) #1088](https://github.com/rust-lang/regex/issues/1088): |
| 229 | Remove guarantees in the API that connect the `u` flag with a specific HIR |
| 230 | representation. |
| 231 | |
| 232 | `regex-automata` breaking change release: |
| 233 | |
| 234 | This release includes a `regex-automata 0.4.0` breaking change release, which |
| 235 | was necessary in order to support the new word boundary assertions. For |
| 236 | example, the `Look` enum has new variants and the `LookSet` type now uses `u32` |
| 237 | instead of `u16` to represent a bitset of look-around assertions. These are |
| 238 | overall very minor changes, and most users of `regex-automata` should be able |
| 239 | to move to `0.4` from `0.3` without any changes at all. |
| 240 | |
| 241 | `regex-syntax` breaking change release: |
| 242 | |
| 243 | This release also includes a `regex-syntax 0.8.0` breaking change release, |
| 244 | which, like `regex-automata`, was necessary in order to support the new word |
| 245 | boundary assertions. This release also includes some changes to the `Ast` |
| 246 | type to reduce heap usage in some cases. If you are using the `Ast` type |
| 247 | directly, your code may require some minor modifications. Otherwise, users of |
| 248 | `regex-syntax 0.7` should be able to migrate to `0.8` without any code changes. |
| 249 | |
| 250 | `regex-lite` release: |
| 251 | |
| 252 | The `regex-lite 0.1.1` release contains support for the new word boundary |
| 253 | assertions. There are no breaking changes. |
| 254 | |
| 255 | |
| 256 | 1.9.6 (2023-09-30) |
| 257 | ================== |
| 258 | This is a patch release that fixes a panic that can occur when the default |
| 259 | regex size limit is increased to a large number. |
| 260 | |
| 261 | * [BUG aa4e4c71](https://github.com/rust-lang/regex/commit/aa4e4c7120b0090ce0624e3c42a2ed06dd8b918a): |
| 262 | Fix a bug where computing the maximum haystack length for the bounded |
| 263 | backtracker could result underflow and thus provoke a panic later in a search |
| 264 | due to a broken invariant. |
| 265 | |
| 266 | |
| 267 | 1.9.5 (2023-09-02) |
| 268 | ================== |
| 269 | This is a patch release that hopefully mostly fixes a performance bug that |
| 270 | occurs when sharing a regex across multiple threads. |
| 271 | |
| 272 | Issue [#934](https://github.com/rust-lang/regex/issues/934) |
| 273 | explains this in more detail. It is [also noted in the crate |
| 274 | documentation](https://docs.rs/regex/latest/regex/#sharing-a-regex-across-threads-can-result-in-contention). |
| 275 | The bug can appear when sharing a regex across multiple threads simultaneously, |
| 276 | as might be the case when using a regex from a `OnceLock`, `lazy_static` or |
| 277 | similar primitive. Usually high contention only results when using many threads |
| 278 | to execute searches on small haystacks. |
| 279 | |
| 280 | One can avoid the contention problem entirely through one of two methods. |
| 281 | The first is to use lower level APIs from `regex-automata` that require passing |
| 282 | state explicitly, such as [`meta::Regex::search_with`](https://docs.rs/regex-automata/latest/regex_automata/meta/struct.Regex.html#method.search_with). |
| 283 | The second is to clone a regex and send it to other threads explicitly. This |
| 284 | will not use any additional memory usage compared to sharing the regex. The |
| 285 | only downside of this approach is that it may be less convenient, for example, |
| 286 | it won't work with things like `OnceLock` or `lazy_static` or `once_cell`. |
| 287 | |
| 288 | With that said, as of this release, the contention performance problems have |
| 289 | been greatly reduced. This was achieved by changing the free-list so that it |
| 290 | was sharded across threads, and that ensuring each sharded mutex occupies a |
| 291 | single cache line to mitigate false sharing. So while contention may still |
| 292 | impact performance in some cases, it should be a lot better now. |
| 293 | |
| 294 | Because of the changes to how the free-list works, please report any issues you |
| 295 | find with this release. That not only includes search time regressions but also |
| 296 | significant regressions in memory usage. Reporting improvements is also welcome |
| 297 | as well! If possible, provide a reproduction. |
| 298 | |
| 299 | Bug fixes: |
| 300 | |
| 301 | * [BUG #934](https://github.com/rust-lang/regex/issues/934): |
| 302 | Fix a performance bug where high contention on a single regex led to massive |
| 303 | slow-downs. |
| 304 | |
| 305 | |
| 306 | 1.9.4 (2023-08-26) |
| 307 | ================== |
| 308 | This is a patch release that fixes a bug where `RegexSet::is_match(..)` could |
| 309 | incorrectly return false (even when `RegexSet::matches(..).matched_any()` |
| 310 | returns true). |
| 311 | |
| 312 | Bug fixes: |
| 313 | |
| 314 | * [BUG #1070](https://github.com/rust-lang/regex/issues/1070): |
| 315 | Fix a bug where a prefilter was incorrectly configured for a `RegexSet`. |
| 316 | |
| 317 | |
| 318 | 1.9.3 (2023-08-05) |
| 319 | ================== |
| 320 | This is a patch release that fixes a bug where some searches could result in |
| 321 | incorrect match offsets being reported. It is difficult to characterize the |
| 322 | types of regexes susceptible to this bug. They generally involve patterns |
| 323 | that contain no prefix or suffix literals, but have an inner literal along with |
| 324 | a regex prefix that can conditionally match. |
| 325 | |
| 326 | Bug fixes: |
| 327 | |
| 328 | * [BUG #1060](https://github.com/rust-lang/regex/issues/1060): |
| 329 | Fix a bug with the reverse inner literal optimization reporting incorrect match |
| 330 | offsets. |
| 331 | |
| 332 | |
| 333 | 1.9.2 (2023-08-05) |
| 334 | ================== |
| 335 | This is a patch release that fixes another memory usage regression. This |
| 336 | particular regression occurred only when using a `RegexSet`. In some cases, |
| 337 | much more heap memory (by one or two orders of magnitude) was allocated than in |
| 338 | versions prior to 1.9.0. |
| 339 | |
| 340 | Bug fixes: |
| 341 | |
| 342 | * [BUG #1059](https://github.com/rust-lang/regex/issues/1059): |
| 343 | Fix a memory usage regression when using a `RegexSet`. |
| 344 | |
| 345 | |
| 346 | 1.9.1 (2023-07-07) |
| 347 | ================== |
| 348 | This is a patch release which fixes a memory usage regression. In the regex |
| 349 | 1.9 release, one of the internal engines used a more aggressive allocation |
| 350 | strategy than what was done previously. This patch release reverts to the |
| 351 | prior on-demand strategy. |
| 352 | |
| 353 | Bug fixes: |
| 354 | |
| 355 | * [BUG #1027](https://github.com/rust-lang/regex/issues/1027): |
| 356 | Change the allocation strategy for the backtracker to be less aggressive. |
| 357 | |
| 358 | |
| 359 | 1.9.0 (2023-07-05) |
| 360 | ================== |
| 361 | This release marks the end of a [years long rewrite of the regex crate |
| 362 | internals](https://github.com/rust-lang/regex/issues/656). Since this is |
| 363 | such a big release, please report any issues or regressions you find. We would |
| 364 | also love to hear about improvements as well. |
| 365 | |
| 366 | In addition to many internal improvements that should hopefully result in |
| 367 | "my regex searches are faster," there have also been a few API additions: |
| 368 | |
| 369 | * A new `Captures::extract` method for quickly accessing the substrings |
| 370 | that match each capture group in a regex. |
| 371 | * A new inline flag, `R`, which enables CRLF mode. This makes `.` match any |
| 372 | Unicode scalar value except for `\r` and `\n`, and also makes `(?m:^)` and |
| 373 | `(?m:$)` match after and before both `\r` and `\n`, respectively, but never |
| 374 | between a `\r` and `\n`. |
| 375 | * `RegexBuilder::line_terminator` was added to further customize the line |
| 376 | terminator used by `(?m:^)` and `(?m:$)` to be any arbitrary byte. |
| 377 | * The `std` Cargo feature is now actually optional. That is, the `regex` crate |
| 378 | can be used without the standard library. |
| 379 | * Because `regex 1.9` may make binary size and compile times even worse, a |
| 380 | new experimental crate called `regex-lite` has been published. It prioritizes |
| 381 | binary size and compile times over functionality (like Unicode) and |
| 382 | performance. It shares no code with the `regex` crate. |
| 383 | |
| 384 | New features: |
| 385 | |
| 386 | * [FEATURE #244](https://github.com/rust-lang/regex/issues/244): |
| 387 | One can opt into CRLF mode via the `R` flag. |
| 388 | e.g., `(?mR:$)` matches just before `\r\n`. |
| 389 | * [FEATURE #259](https://github.com/rust-lang/regex/issues/259): |
| 390 | Multi-pattern searches with offsets can be done with `regex-automata 0.3`. |
| 391 | * [FEATURE #476](https://github.com/rust-lang/regex/issues/476): |
| 392 | `std` is now an optional feature. `regex` may be used with only `alloc`. |
| 393 | * [FEATURE #644](https://github.com/rust-lang/regex/issues/644): |
| 394 | `RegexBuilder::line_terminator` configures how `(?m:^)` and `(?m:$)` behave. |
| 395 | * [FEATURE #675](https://github.com/rust-lang/regex/issues/675): |
| 396 | Anchored search APIs are now available in `regex-automata 0.3`. |
| 397 | * [FEATURE #824](https://github.com/rust-lang/regex/issues/824): |
| 398 | Add new `Captures::extract` method for easier capture group access. |
| 399 | * [FEATURE #961](https://github.com/rust-lang/regex/issues/961): |
| 400 | Add `regex-lite` crate with smaller binary sizes and faster compile times. |
| 401 | * [FEATURE #1022](https://github.com/rust-lang/regex/pull/1022): |
| 402 | Add `TryFrom` implementations for the `Regex` type. |
| 403 | |
| 404 | Performance improvements: |
| 405 | |
| 406 | * [PERF #68](https://github.com/rust-lang/regex/issues/68): |
| 407 | Added a one-pass DFA engine for faster capture group matching. |
| 408 | * [PERF #510](https://github.com/rust-lang/regex/issues/510): |
| 409 | Inner literals are now used to accelerate searches, e.g., `\w+@\w+` will scan |
| 410 | for `@`. |
| 411 | * [PERF #787](https://github.com/rust-lang/regex/issues/787), |
| 412 | [PERF #891](https://github.com/rust-lang/regex/issues/891): |
| 413 | Makes literal optimizations apply to regexes of the form `\b(foo|bar|quux)\b`. |
| 414 | |
| 415 | (There are many more performance improvements as well, but not all of them have |
| 416 | specific issues devoted to them.) |
| 417 | |
| 418 | Bug fixes: |
| 419 | |
| 420 | * [BUG #429](https://github.com/rust-lang/regex/issues/429): |
| 421 | Fix matching bugs related to `\B` and inconsistencies across internal engines. |
| 422 | * [BUG #517](https://github.com/rust-lang/regex/issues/517): |
| 423 | Fix matching bug with capture groups. |
| 424 | * [BUG #579](https://github.com/rust-lang/regex/issues/579): |
| 425 | Fix matching bug with word boundaries. |
| 426 | * [BUG #779](https://github.com/rust-lang/regex/issues/779): |
| 427 | Fix bug where some regexes like `(re)+` were not equivalent to `(re)(re)*`. |
| 428 | * [BUG #850](https://github.com/rust-lang/regex/issues/850): |
| 429 | Fix matching bug inconsistency between NFA and DFA engines. |
| 430 | * [BUG #921](https://github.com/rust-lang/regex/issues/921): |
| 431 | Fix matching bug where literal extraction got confused by `$`. |
| 432 | * [BUG #976](https://github.com/rust-lang/regex/issues/976): |
| 433 | Add documentation to replacement routines about dealing with fallibility. |
| 434 | * [BUG #1002](https://github.com/rust-lang/regex/issues/1002): |
| 435 | Use corpus rejection in fuzz testing. |
| 436 | |
| 437 | |
| 438 | 1.8.4 (2023-06-05) |
| 439 | ================== |
| 440 | This is a patch release that fixes a bug where `(?-u:\B)` was allowed in |
| 441 | Unicode regexes, despite the fact that the current matching engines can report |
| 442 | match offsets between the code units of a single UTF-8 encoded codepoint. That |
| 443 | in turn means that match offsets that split a codepoint could be reported, |
| 444 | which in turn results in panicking when one uses them to slice a `&str`. |
| 445 | |
| 446 | This bug occurred in the transition to `regex 1.8` because the underlying |
| 447 | syntactical error that prevented this regex from compiling was intentionally |
| 448 | removed. That's because `(?-u:\B)` will be permitted in Unicode regexes in |
| 449 | `regex 1.9`, but the matching engines will guarantee to never report match |
| 450 | offsets that split a codepoint. When the underlying syntactical error was |
| 451 | removed, no code was added to ensure that `(?-u:\B)` didn't compile in the |
| 452 | `regex 1.8` transition release. This release, `regex 1.8.4`, adds that code |
| 453 | such that `Regex::new(r"(?-u:\B)")` returns to the `regex <1.8` behavior of |
| 454 | not compiling. (A `bytes::Regex` can still of course compile it.) |
| 455 | |
| 456 | Bug fixes: |
| 457 | |
| 458 | * [BUG #1006](https://github.com/rust-lang/regex/issues/1006): |
| 459 | Fix a bug where `(?-u:\B)` was allowed in Unicode regexes, and in turn could |
| 460 | lead to match offsets that split a codepoint in `&str`. |
| 461 | |
| 462 | |
| 463 | 1.8.3 (2023-05-25) |
| 464 | ================== |
| 465 | This is a patch release that fixes a bug where the regex would report a |
| 466 | match at every position even when it shouldn't. This could occur in a very |
| 467 | small subset of regexes, usually an alternation of simple literals that |
| 468 | have particular properties. (See the issue linked below for a more precise |
| 469 | description.) |
| 470 | |
| 471 | Bug fixes: |
| 472 | |
| 473 | * [BUG #999](https://github.com/rust-lang/regex/issues/999): |
| 474 | Fix a bug where a match at every position is erroneously reported. |
| 475 | |
| 476 | |
| 477 | 1.8.2 (2023-05-22) |
| 478 | ================== |
| 479 | This is a patch release that fixes a bug where regex compilation could panic |
| 480 | in debug mode for regexes with large counted repetitions. For example, |
| 481 | `a{2147483516}{2147483416}{5}` resulted in an integer overflow that wrapped |
| 482 | in release mode but panicking in debug mode. Despite the unintended wrapping |
| 483 | arithmetic in release mode, it didn't cause any other logical bugs since the |
| 484 | errant code was for new analysis that wasn't used yet. |
| 485 | |
| 486 | Bug fixes: |
| 487 | |
| 488 | * [BUG #995](https://github.com/rust-lang/regex/issues/995): |
| 489 | Fix a bug where regex compilation with large counted repetitions could panic. |
| 490 | |
| 491 | |
| 492 | 1.8.1 (2023-04-21) |
| 493 | ================== |
| 494 | This is a patch release that fixes a bug where a regex match could be reported |
| 495 | where none was found. Specifically, the bug occurs when a pattern contains some |
| 496 | literal prefixes that could be extracted _and_ an optional word boundary in the |
| 497 | prefix. |
| 498 | |
| 499 | Bug fixes: |
| 500 | |
| 501 | * [BUG #981](https://github.com/rust-lang/regex/issues/981): |
| 502 | Fix a bug where a word boundary could interact with prefix literal |
| 503 | optimizations and lead to a false positive match. |
| 504 | |
| 505 | |
| 506 | 1.8.0 (2023-04-20) |
| 507 | ================== |
| 508 | This is a sizeable release that will be soon followed by another sizeable |
| 509 | release. Both of them will combined close over 40 existing issues and PRs. |
| 510 | |
| 511 | This first release, despite its size, essentially represents preparatory work |
| 512 | for the second release, which will be even bigger. Namely, this release: |
| 513 | |
| 514 | * Increases the MSRV to Rust 1.60.0, which was released about 1 year ago. |
| 515 | * Upgrades its dependency on `aho-corasick` to the recently released 1.0 |
| 516 | version. |
| 517 | * Upgrades its dependency on `regex-syntax` to the simultaneously released |
| 518 | `0.7` version. The changes to `regex-syntax` principally revolve around a |
| 519 | rewrite of its literal extraction code and a number of simplifications and |
| 520 | optimizations to its high-level intermediate representation (HIR). |
| 521 | |
| 522 | The second release, which will follow ~shortly after the release above, will |
| 523 | contain a soup-to-nuts rewrite of every regex engine. This will be done by |
| 524 | bringing [`regex-automata`](https://github.com/BurntSushi/regex-automata) into |
| 525 | this repository, and then changing the `regex` crate to be nothing but an API |
| 526 | shim layer on top of `regex-automata`'s API. |
| 527 | |
| 528 | These tandem releases are the culmination of about 3 |
| 529 | years of on-and-off work that [began in earnest in March |
| 530 | 2020](https://github.com/rust-lang/regex/issues/656). |
| 531 | |
| 532 | Because of the scale of changes involved in these releases, I would love to |
| 533 | hear about your experience. Especially if you notice undocumented changes in |
| 534 | behavior or performance changes (positive *or* negative). |
| 535 | |
| 536 | Most changes in the first release are listed below. For more details, please |
| 537 | see the commit log, which reflects a linear and decently documented history |
| 538 | of all changes. |
| 539 | |
| 540 | New features: |
| 541 | |
| 542 | * [FEATURE #501](https://github.com/rust-lang/regex/issues/501): |
| 543 | Permit many more characters to be escaped, even if they have no significance. |
| 544 | More specifically, any ASCII character except for `[0-9A-Za-z<>]` can now be |
| 545 | escaped. Also, a new routine, `is_escapeable_character`, has been added to |
| 546 | `regex-syntax` to query whether a character is escapable or not. |
| 547 | * [FEATURE #547](https://github.com/rust-lang/regex/issues/547): |
| 548 | Add `Regex::captures_at`. This fills a hole in the API, but doesn't otherwise |
| 549 | introduce any new expressive power. |
| 550 | * [FEATURE #595](https://github.com/rust-lang/regex/issues/595): |
| 551 | Capture group names are now Unicode-aware. They can now begin with either a `_` |
| 552 | or any "alphabetic" codepoint. After the first codepoint, subsequent codepoints |
| 553 | can be any sequence of alphanumeric codepoints, along with `_`, `.`, `[` and |
| 554 | `]`. Note that replacement syntax has not changed. |
| 555 | * [FEATURE #810](https://github.com/rust-lang/regex/issues/810): |
| 556 | Add `Match::is_empty` and `Match::len` APIs. |
| 557 | * [FEATURE #905](https://github.com/rust-lang/regex/issues/905): |
| 558 | Add an `impl Default for RegexSet`, with the default being the empty set. |
| 559 | * [FEATURE #908](https://github.com/rust-lang/regex/issues/908): |
| 560 | A new method, `Regex::static_captures_len`, has been added which returns the |
| 561 | number of capture groups in the pattern if and only if every possible match |
| 562 | always contains the same number of matching groups. |
| 563 | * [FEATURE #955](https://github.com/rust-lang/regex/issues/955): |
| 564 | Named captures can now be written as `(?<name>re)` in addition to |
| 565 | `(?P<name>re)`. |
| 566 | * FEATURE: `regex-syntax` now supports empty character classes. |
| 567 | * FEATURE: `regex-syntax` now has an optional `std` feature. (This will come |
| 568 | to `regex` in the second release.) |
| 569 | * FEATURE: The `Hir` type in `regex-syntax` has had a number of simplifications |
| 570 | made to it. |
| 571 | * FEATURE: `regex-syntax` has support for a new `R` flag for enabling CRLF |
| 572 | mode. This will be supported in `regex` proper in the second release. |
| 573 | * FEATURE: `regex-syntax` now has proper support for "regex that never |
| 574 | matches" via `Hir::fail()`. |
| 575 | * FEATURE: The `hir::literal` module of `regex-syntax` has been completely |
| 576 | re-worked. It now has more documentation, examples and advice. |
| 577 | * FEATURE: The `allow_invalid_utf8` option in `regex-syntax` has been renamed |
| 578 | to `utf8`, and the meaning of the boolean has been flipped. |
| 579 | |
| 580 | Performance improvements: |
| 581 | |
| 582 | * PERF: The upgrade to `aho-corasick 1.0` may improve performance in some |
| 583 | cases. It's difficult to characterize exactly which patterns this might impact, |
| 584 | but if there are a small number of longish (>= 4 bytes) prefix literals, then |
| 585 | it might be faster than before. |
| 586 | |
| 587 | Bug fixes: |
| 588 | |
| 589 | * [BUG #514](https://github.com/rust-lang/regex/issues/514): |
| 590 | Improve `Debug` impl for `Match` so that it doesn't show the entire haystack. |
| 591 | * BUGS [#516](https://github.com/rust-lang/regex/issues/516), |
| 592 | [#731](https://github.com/rust-lang/regex/issues/731): |
| 593 | Fix a number of issues with printing `Hir` values as regex patterns. |
| 594 | * [BUG #610](https://github.com/rust-lang/regex/issues/610): |
| 595 | Add explicit example of `foo|bar` in the regex syntax docs. |
| 596 | * [BUG #625](https://github.com/rust-lang/regex/issues/625): |
| 597 | Clarify that `SetMatches::len` does not (regrettably) refer to the number of |
| 598 | matches in the set. |
| 599 | * [BUG #660](https://github.com/rust-lang/regex/issues/660): |
| 600 | Clarify "verbose mode" in regex syntax documentation. |
| 601 | * BUG [#738](https://github.com/rust-lang/regex/issues/738), |
| 602 | [#950](https://github.com/rust-lang/regex/issues/950): |
| 603 | Fix `CaptureLocations::get` so that it never panics. |
| 604 | * [BUG #747](https://github.com/rust-lang/regex/issues/747): |
| 605 | Clarify documentation for `Regex::shortest_match`. |
| 606 | * [BUG #835](https://github.com/rust-lang/regex/issues/835): |
| 607 | Fix `\p{Sc}` so that it is equivalent to `\p{Currency_Symbol}`. |
| 608 | * [BUG #846](https://github.com/rust-lang/regex/issues/846): |
| 609 | Add more clarifying documentation to the `CompiledTooBig` error variant. |
| 610 | * [BUG #854](https://github.com/rust-lang/regex/issues/854): |
| 611 | Clarify that `regex::Regex` searches as if the haystack is a sequence of |
| 612 | Unicode scalar values. |
| 613 | * [BUG #884](https://github.com/rust-lang/regex/issues/884): |
| 614 | Replace `__Nonexhaustive` variants with `#[non_exhaustive]` attribute. |
| 615 | * [BUG #893](https://github.com/rust-lang/regex/pull/893): |
| 616 | Optimize case folding since it can get quite slow in some pathological cases. |
| 617 | * [BUG #895](https://github.com/rust-lang/regex/issues/895): |
| 618 | Reject `(?-u:\W)` in `regex::Regex` APIs. |
| 619 | * [BUG #942](https://github.com/rust-lang/regex/issues/942): |
| 620 | Add a missing `void` keyword to indicate "no parameters" in C API. |
| 621 | * [BUG #965](https://github.com/rust-lang/regex/issues/965): |
| 622 | Fix `\p{Lc}` so that it is equivalent to `\p{Cased_Letter}`. |
| 623 | * [BUG #975](https://github.com/rust-lang/regex/issues/975): |
| 624 | Clarify documentation for `\pX` syntax. |
| 625 | |
| 626 | |
| 627 | 1.7.3 (2023-03-24) |
| 628 | ================== |
| 629 | This is a small release that fixes a bug in `Regex::shortest_match_at` that |
| 630 | could cause it to panic, even when the offset given is valid. |
| 631 | |
| 632 | Bug fixes: |
| 633 | |
| 634 | * [BUG #969](https://github.com/rust-lang/regex/issues/969): |
| 635 | Fix a bug in how the reverse DFA was called for `Regex::shortest_match_at`. |
| 636 | |
| 637 | |
| 638 | 1.7.2 (2023-03-21) |
| 639 | ================== |
| 640 | This is a small release that fixes a failing test on FreeBSD. |
| 641 | |
| 642 | Bug fixes: |
| 643 | |
| 644 | * [BUG #967](https://github.com/rust-lang/regex/issues/967): |
| 645 | Fix "no stack overflow" test which can fail due to the small stack size. |
| 646 | |
| 647 | |
| 648 | 1.7.1 (2023-01-09) |
| 649 | ================== |
| 650 | This release was done principally to try and fix the doc.rs rendering for the |
| 651 | regex crate. |
| 652 | |
| 653 | Performance improvements: |
| 654 | |
| 655 | * [PERF #930](https://github.com/rust-lang/regex/pull/930): |
| 656 | Optimize `replacen`. This also applies to `replace`, but not `replace_all`. |
| 657 | |
| 658 | Bug fixes: |
| 659 | |
| 660 | * [BUG #945](https://github.com/rust-lang/regex/issues/945): |
| 661 | Maybe fix rustdoc rendering by just bumping a new release? |
| 662 | |
| 663 | |
| 664 | 1.7.0 (2022-11-05) |
| 665 | ================== |
| 666 | This release principally includes an upgrade to Unicode 15. |
| 667 | |
| 668 | New features: |
| 669 | |
| 670 | * [FEATURE #832](https://github.com/rust-lang/regex/issues/916): |
| 671 | Upgrade to Unicode 15. |
| 672 | |
| 673 | |
| 674 | 1.6.0 (2022-07-05) |
| 675 | ================== |
| 676 | This release principally includes an upgrade to Unicode 14. |
| 677 | |
| 678 | New features: |
| 679 | |
| 680 | * [FEATURE #832](https://github.com/rust-lang/regex/pull/832): |
| 681 | Clarify that `Captures::len` includes all groups, not just matching groups. |
| 682 | * [FEATURE #857](https://github.com/rust-lang/regex/pull/857): |
| 683 | Add an `ExactSizeIterator` impl for `SubCaptureMatches`. |
| 684 | * [FEATURE #861](https://github.com/rust-lang/regex/pull/861): |
| 685 | Improve `RegexSet` documentation examples. |
| 686 | * [FEATURE #877](https://github.com/rust-lang/regex/issues/877): |
| 687 | Upgrade to Unicode 14. |
| 688 | |
| 689 | Bug fixes: |
| 690 | |
| 691 | * [BUG #792](https://github.com/rust-lang/regex/issues/792): |
| 692 | Fix error message rendering bug. |
| 693 | |
| 694 | |
| 695 | 1.5.6 (2022-05-20) |
| 696 | ================== |
| 697 | This release includes a few bug fixes, including a bug that produced incorrect |
| 698 | matches when a non-greedy `?` operator was used. |
| 699 | |
| 700 | * [BUG #680](https://github.com/rust-lang/regex/issues/680): |
| 701 | Fixes a bug where `[[:alnum:][:^ascii:]]` dropped `[:alnum:]` from the class. |
| 702 | * [BUG #859](https://github.com/rust-lang/regex/issues/859): |
| 703 | Fixes a bug where `Hir::is_match_empty` returned `false` for `\b`. |
| 704 | * [BUG #862](https://github.com/rust-lang/regex/issues/862): |
| 705 | Fixes a bug where 'ab??' matches 'ab' instead of 'a' in 'ab'. |
| 706 | |
| 707 | |
| 708 | 1.5.5 (2022-03-08) |
| 709 | ================== |
| 710 | This releases fixes a security bug in the regex compiler. This bug permits a |
| 711 | vector for a denial-of-service attack in cases where the regex being compiled |
| 712 | is untrusted. There are no known problems where the regex is itself trusted, |
| 713 | including in cases of untrusted haystacks. |
| 714 | |
| 715 | * [SECURITY #GHSA-m5pq-gvj9-9vr8](https://github.com/rust-lang/regex/security/advisories/GHSA-m5pq-gvj9-9vr8): |
| 716 | Fixes a bug in the regex compiler where empty sub-expressions subverted the |
| 717 | existing mitigations in place to enforce a size limit on compiled regexes. |
| 718 | The Rust Security Response WG published an advisory about this: |
| 719 | https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw |
| 720 | |
| 721 | |
| 722 | 1.5.4 (2021-05-06) |
| 723 | ================== |
| 724 | This release fixes another compilation failure when building regex. This time, |
| 725 | the fix is for when the `pattern` feature is enabled, which only works on |
| 726 | nightly Rust. CI has been updated to test this case. |
| 727 | |
| 728 | * [BUG #772](https://github.com/rust-lang/regex/pull/772): |
| 729 | Fix build when `pattern` feature is enabled. |
| 730 | |
| 731 | |
| 732 | 1.5.3 (2021-05-01) |
| 733 | ================== |
| 734 | This releases fixes a bug when building regex with only the `unicode-perl` |
| 735 | feature. It turns out that while CI was building this configuration, it wasn't |
| 736 | actually failing the overall build on a failed compilation. |
| 737 | |
| 738 | * [BUG #769](https://github.com/rust-lang/regex/issues/769): |
| 739 | Fix build in `regex-syntax` when only the `unicode-perl` feature is enabled. |
| 740 | |
| 741 | |
| 742 | 1.5.2 (2021-05-01) |
| 743 | ================== |
| 744 | This release fixes a performance bug when Unicode word boundaries are used. |
| 745 | Namely, for certain regexes on certain inputs, it's possible for the lazy DFA |
| 746 | to stop searching (causing a fallback to a slower engine) when it doesn't |
| 747 | actually need to. |
| 748 | |
| 749 | [PR #768](https://github.com/rust-lang/regex/pull/768) fixes the bug, which was |
| 750 | originally reported in |
| 751 | [ripgrep#1860](https://github.com/BurntSushi/ripgrep/issues/1860). |
| 752 | |
| 753 | |
| 754 | 1.5.1 (2021-04-30) |
| 755 | ================== |
| 756 | This is a patch release that fixes a compilation error when the `perf-literal` |
| 757 | feature is not enabled. |
| 758 | |
| 759 | |
| 760 | 1.5.0 (2021-04-30) |
| 761 | ================== |
| 762 | This release primarily updates to Rust 2018 (finally) and bumps the MSRV to |
| 763 | Rust 1.41 (from Rust 1.28). Rust 1.41 was chosen because it's still reasonably |
| 764 | old, and is what's in Debian stable at the time of writing. |
| 765 | |
| 766 | This release also drops this crate's own bespoke substring search algorithms |
| 767 | in favor of a new |
| 768 | [`memmem` implementation provided by the `memchr` crate](https://docs.rs/memchr/2.4.0/memchr/memmem/index.html). |
| 769 | This will change the performance profile of some regexes, sometimes getting a |
| 770 | little worse, and hopefully more frequently, getting a lot better. Please |
| 771 | report any serious performance regressions if you find them. |
| 772 | |
| 773 | |
| 774 | 1.4.6 (2021-04-22) |
| 775 | ================== |
| 776 | This is a small patch release that fixes the compiler's size check on how much |
| 777 | heap memory a regex uses. Previously, the compiler did not account for the |
| 778 | heap usage of Unicode character classes. Now it does. It's possible that this |
| 779 | may make some regexes fail to compile that previously did compile. If that |
| 780 | happens, please file an issue. |
| 781 | |
| 782 | * [BUG OSS-fuzz#33579](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33579): |
| 783 | Some regexes can use more heap memory than one would expect. |
| 784 | |
| 785 | |
| 786 | 1.4.5 (2021-03-14) |
| 787 | ================== |
| 788 | This is a small patch release that fixes a regression in the size of a `Regex` |
| 789 | in the 1.4.4 release. Prior to 1.4.4, a `Regex` was 552 bytes. In the 1.4.4 |
| 790 | release, it was 856 bytes due to internal changes. In this release, a `Regex` |
| 791 | is now 16 bytes. In general, the size of a `Regex` was never something that was |
| 792 | on my radar, but this increased size in the 1.4.4 release seems to have crossed |
| 793 | a threshold and resulted in stack overflows in some programs. |
| 794 | |
| 795 | * [BUG #750](https://github.com/rust-lang/regex/pull/750): |
| 796 | Fixes stack overflows seemingly caused by a large `Regex` size by decreasing |
| 797 | its size. |
| 798 | |
| 799 | |
| 800 | 1.4.4 (2021-03-11) |
| 801 | ================== |
| 802 | This is a small patch release that contains some bug fixes. Notably, it also |
| 803 | drops the `thread_local` (and `lazy_static`, via transitivity) dependencies. |
| 804 | |
| 805 | Bug fixes: |
| 806 | |
| 807 | * [BUG #362](https://github.com/rust-lang/regex/pull/362): |
| 808 | Memory leaks caused by an internal caching strategy should now be fixed. |
| 809 | * [BUG #576](https://github.com/rust-lang/regex/pull/576): |
| 810 | All regex types now implement `UnwindSafe` and `RefUnwindSafe`. |
| 811 | * [BUG #728](https://github.com/rust-lang/regex/pull/749): |
| 812 | Add missing `Replacer` impls for `Vec<u8>`, `String`, `Cow`, etc. |
| 813 | |
| 814 | |
| 815 | 1.4.3 (2021-01-08) |
| 816 | ================== |
| 817 | This is a small patch release that adds some missing standard trait |
| 818 | implementations for some types in the public API. |
| 819 | |
| 820 | Bug fixes: |
| 821 | |
| 822 | * [BUG #734](https://github.com/rust-lang/regex/pull/734): |
| 823 | Add `FusedIterator` and `ExactSizeIterator` impls to iterator types. |
| 824 | * [BUG #735](https://github.com/rust-lang/regex/pull/735): |
| 825 | Add missing `Debug` impls to public API types. |
| 826 | |
| 827 | |
| 828 | 1.4.2 (2020-11-01) |
| 829 | ================== |
| 830 | This is a small bug fix release that bans `\P{any}`. We previously banned empty |
| 831 | classes like `[^\w\W]`, but missed the `\P{any}` case. In the future, we hope |
| 832 | to permit empty classes. |
| 833 | |
| 834 | * [BUG #722](https://github.com/rust-lang/regex/issues/722): |
| 835 | Ban `\P{any}` to avoid a panic in the regex compiler. Found by OSS-Fuzz. |
| 836 | |
| 837 | |
| 838 | 1.4.1 (2020-10-13) |
| 839 | ================== |
| 840 | This is a small bug fix release that makes `\p{cf}` work. Previously, it would |
| 841 | report "property not found" even though `cf` is a valid abbreviation for the |
| 842 | `Format` general category. |
| 843 | |
| 844 | * [BUG #719](https://github.com/rust-lang/regex/issues/719): |
| 845 | Fixes bug that prevented `\p{cf}` from working. |
| 846 | |
| 847 | |
| 848 | 1.4.0 (2020-10-11) |
| 849 | ================== |
| 850 | This releases has a few minor documentation fixes as well as some very minor |
| 851 | API additions. The MSRV remains at Rust 1.28 for now, but this is intended to |
| 852 | increase to at least Rust 1.41.1 soon. |
| 853 | |
| 854 | This release also adds support for OSS-Fuzz. Kudos to |
| 855 | [@DavidKorczynski](https://github.com/DavidKorczynski) |
| 856 | for doing the heavy lifting for that! |
| 857 | |
| 858 | New features: |
| 859 | |
| 860 | * [FEATURE #649](https://github.com/rust-lang/regex/issues/649): |
| 861 | Support `[`, `]` and `.` in capture group names. |
| 862 | * [FEATURE #687](https://github.com/rust-lang/regex/issues/687): |
| 863 | Add `is_empty` predicate to `RegexSet`. |
| 864 | * [FEATURE #689](https://github.com/rust-lang/regex/issues/689): |
| 865 | Implement `Clone` for `SubCaptureMatches`. |
| 866 | * [FEATURE #715](https://github.com/rust-lang/regex/issues/715): |
| 867 | Add `empty` constructor to `RegexSet` for convenience. |
| 868 | |
| 869 | Bug fixes: |
| 870 | |
| 871 | * [BUG #694](https://github.com/rust-lang/regex/issues/694): |
| 872 | Fix doc example for `Replacer::replace_append`. |
| 873 | * [BUG #698](https://github.com/rust-lang/regex/issues/698): |
| 874 | Clarify docs for `s` flag when using a `bytes::Regex`. |
| 875 | * [BUG #711](https://github.com/rust-lang/regex/issues/711): |
| 876 | Clarify `is_match` docs to indicate that it can match anywhere in string. |
| 877 | |
| 878 | |
| 879 | 1.3.9 (2020-05-28) |
| 880 | ================== |
| 881 | This release fixes a MSRV (Minimum Support Rust Version) regression in the |
| 882 | 1.3.8 release. Namely, while 1.3.8 compiles on Rust 1.28, it actually does not |
| 883 | compile on other Rust versions, such as Rust 1.39. |
| 884 | |
| 885 | Bug fixes: |
| 886 | |
| 887 | * [BUG #685](https://github.com/rust-lang/regex/issues/685): |
| 888 | Remove use of `doc_comment` crate, which cannot be used before Rust 1.43. |
| 889 | |
| 890 | |
| 891 | 1.3.8 (2020-05-28) |
| 892 | ================== |
| 893 | This release contains a couple of important bug fixes driven |
| 894 | by better support for empty-subexpressions in regexes. For |
| 895 | example, regexes like `b|` are now allowed. Major thanks to |
| 896 | [@sliquister](https://github.com/sliquister) for implementing support for this |
| 897 | in [#677](https://github.com/rust-lang/regex/pull/677). |
| 898 | |
| 899 | Bug fixes: |
| 900 | |
| 901 | * [BUG #523](https://github.com/rust-lang/regex/pull/523): |
| 902 | Add note to documentation that spaces can be escaped in `x` mode. |
| 903 | * [BUG #524](https://github.com/rust-lang/regex/issues/524): |
| 904 | Add support for empty sub-expressions, including empty alternations. |
| 905 | * [BUG #659](https://github.com/rust-lang/regex/issues/659): |
| 906 | Fix match bug caused by an empty sub-expression miscompilation. |
| 907 | |
| 908 | |
| 909 | 1.3.7 (2020-04-17) |
| 910 | ================== |
| 911 | This release contains a small bug fix that fixes how `regex` forwards crate |
| 912 | features to `regex-syntax`. In particular, this will reduce recompilations in |
| 913 | some cases. |
| 914 | |
| 915 | Bug fixes: |
| 916 | |
| 917 | * [BUG #665](https://github.com/rust-lang/regex/pull/665): |
| 918 | Fix feature forwarding to `regex-syntax`. |
| 919 | |
| 920 | |
| 921 | 1.3.6 (2020-03-24) |
| 922 | ================== |
| 923 | This release contains a sizable (~30%) performance improvement when compiling |
| 924 | some kinds of large regular expressions. |
| 925 | |
| 926 | Performance improvements: |
| 927 | |
| 928 | * [PERF #657](https://github.com/rust-lang/regex/pull/657): |
| 929 | Improvement performance of compiling large regular expressions. |
| 930 | |
| 931 | |
| 932 | 1.3.5 (2020-03-12) |
| 933 | ================== |
| 934 | This release updates this crate to Unicode 13. |
| 935 | |
| 936 | New features: |
| 937 | |
| 938 | * [FEATURE #653](https://github.com/rust-lang/regex/pull/653): |
| 939 | Update `regex-syntax` to Unicode 13. |
| 940 | |
| 941 | |
| 942 | 1.3.4 (2020-01-30) |
| 943 | ================== |
| 944 | This is a small bug fix release that fixes a bug related to the scoping of |
| 945 | flags in a regex. Namely, before this fix, a regex like `((?i)a)b)` would |
| 946 | match `aB` despite the fact that `b` should not be matched case insensitively. |
| 947 | |
| 948 | Bug fixes: |
| 949 | |
| 950 | * [BUG #640](https://github.com/rust-lang/regex/issues/640): |
| 951 | Fix bug related to the scoping of flags in a regex. |
| 952 | |
| 953 | |
| 954 | 1.3.3 (2020-01-09) |
| 955 | ================== |
| 956 | This is a small maintenance release that upgrades the dependency on |
| 957 | `thread_local` from `0.3` to `1.0`. The minimum supported Rust version remains |
| 958 | at Rust 1.28. |
| 959 | |
| 960 | |
| 961 | 1.3.2 (2020-01-09) |
| 962 | ================== |
| 963 | This is a small maintenance release with some house cleaning and bug fixes. |
| 964 | |
| 965 | New features: |
| 966 | |
| 967 | * [FEATURE #631](https://github.com/rust-lang/regex/issues/631): |
| 968 | Add a `Match::range` method an a `From<Match> for Range` impl. |
| 969 | |
| 970 | Bug fixes: |
| 971 | |
| 972 | * [BUG #521](https://github.com/rust-lang/regex/issues/521): |
| 973 | Corrects `/-/.splitn("a", 2)` to return `["a"]` instead of `["a", ""]`. |
| 974 | * [BUG #594](https://github.com/rust-lang/regex/pull/594): |
| 975 | Improve error reporting when writing `\p\`. |
| 976 | * [BUG #627](https://github.com/rust-lang/regex/issues/627): |
| 977 | Corrects `/-/.split("a-")` to return `["a", ""]` instead of `["a"]`. |
| 978 | * [BUG #633](https://github.com/rust-lang/regex/pull/633): |
| 979 | Squash deprecation warnings for the `std::error::Error::description` method. |
| 980 | |
| 981 | |
| 982 | 1.3.1 (2019-09-04) |
| 983 | ================== |
| 984 | This is a maintenance release with no changes in order to try to work around |
| 985 | a [docs.rs/Cargo issue](https://github.com/rust-lang/docs.rs/issues/400). |
| 986 | |
| 987 | |
| 988 | 1.3.0 (2019-09-03) |
| 989 | ================== |
| 990 | This release adds a plethora of new crate features that permit users of regex |
| 991 | to shrink its size considerably, in exchange for giving up either functionality |
| 992 | (such as Unicode support) or runtime performance. When all such features are |
| 993 | disabled, the dependency tree for `regex` shrinks to exactly 1 crate |
| 994 | (`regex-syntax`). More information about the new crate features can be |
| 995 | [found in the docs](https://docs.rs/regex/*/#crate-features). |
| 996 | |
| 997 | Note that while this is a new minor version release, the minimum supported |
| 998 | Rust version for this crate remains at `1.28.0`. |
| 999 | |
| 1000 | New features: |
| 1001 | |
| 1002 | * [FEATURE #474](https://github.com/rust-lang/regex/issues/474): |
| 1003 | The `use_std` feature has been deprecated in favor of the `std` feature. |
| 1004 | The `use_std` feature will be removed in regex 2. Until then, `use_std` will |
| 1005 | remain as an alias for the `std` feature. |
| 1006 | * [FEATURE #583](https://github.com/rust-lang/regex/issues/583): |
| 1007 | Add a substantial number of crate features shrinking `regex`. |
| 1008 | |
| 1009 | |
| 1010 | 1.2.1 (2019-08-03) |
| 1011 | ================== |
| 1012 | This release does a bit of house cleaning. Namely: |
| 1013 | |
| 1014 | * This repository is now using rustfmt. |
| 1015 | * License headers have been removed from all files, in following suit with the |
| 1016 | Rust project. |
| 1017 | * Teddy has been removed from the `regex` crate, and is now part of the |
| 1018 | `aho-corasick` crate. |
| 1019 | [See `aho-corasick`'s new `packed` submodule for details](https://docs.rs/aho-corasick/0.7.6/aho_corasick/packed/index.html). |
| 1020 | * The `utf8-ranges` crate has been deprecated, with its functionality moving |
| 1021 | into the |
| 1022 | [`utf8` sub-module of `regex-syntax`](https://docs.rs/regex-syntax/0.6.11/regex_syntax/utf8/index.html). |
| 1023 | * The `ucd-util` dependency has been dropped, in favor of implementing what |
| 1024 | little we need inside of `regex-syntax` itself. |
| 1025 | |
| 1026 | In general, this is part of an ongoing (long term) effort to make optimizations |
| 1027 | in the regex engine easier to reason about. The current code is too convoluted, |
| 1028 | and thus it is very easy to introduce new bugs. This simplification effort is |
| 1029 | the primary motivation behind re-working the `aho-corasick` crate to not only |
| 1030 | bundle algorithms like Teddy, but to also provide regex-like match semantics |
| 1031 | automatically. |
| 1032 | |
| 1033 | Moving forward, the plan is to join up with the `bstr` and `regex-automata` |
| 1034 | crates, with the former providing more sophisticated substring search |
| 1035 | algorithms (thereby deleting existing code in `regex`) and the latter providing |
| 1036 | ahead-of-time compiled DFAs for cases where they are inexpensive to compute. |
| 1037 | |
| 1038 | |
| 1039 | 1.2.0 (2019-07-20) |
| 1040 | ================== |
| 1041 | This release updates regex's minimum supported Rust version to 1.28, which was |
| 1042 | release almost 1 year ago. This release also updates regex's Unicode data |
| 1043 | tables to 12.1.0. |
| 1044 | |
| 1045 | |
| 1046 | 1.1.9 (2019-07-06) |
| 1047 | ================== |
| 1048 | This release contains a bug fix that caused regex's tests to fail, due to a |
| 1049 | dependency on an unreleased behavior in regex-syntax. |
| 1050 | |
| 1051 | * [BUG #593](https://github.com/rust-lang/regex/issues/593): |
| 1052 | Move an integration-style test on error messages into regex-syntax. |
| 1053 | |
| 1054 | |
| 1055 | 1.1.8 (2019-07-04) |
| 1056 | ================== |
| 1057 | This release contains a few small internal refactorings. One of which fixes |
| 1058 | an instance of undefined behavior in a part of the SIMD code. |
| 1059 | |
| 1060 | Bug fixes: |
| 1061 | |
| 1062 | * [BUG #545](https://github.com/rust-lang/regex/issues/545): |
| 1063 | Improves error messages when a repetition operator is used without a number. |
| 1064 | * [BUG #588](https://github.com/rust-lang/regex/issues/588): |
| 1065 | Removes use of a repr(Rust) union used for type punning in the Teddy matcher. |
| 1066 | * [BUG #591](https://github.com/rust-lang/regex/issues/591): |
| 1067 | Update docs for running benchmarks and improve failure modes. |
| 1068 | |
| 1069 | |
| 1070 | 1.1.7 (2019-06-09) |
| 1071 | ================== |
| 1072 | This release fixes up a few warnings as a result of recent deprecations. |
| 1073 | |
| 1074 | |
| 1075 | 1.1.6 (2019-04-16) |
| 1076 | ================== |
| 1077 | This release fixes a regression introduced by a bug fix (for |
| 1078 | [BUG #557](https://github.com/rust-lang/regex/issues/557)) which could cause |
| 1079 | the regex engine to enter an infinite loop. This bug was originally |
| 1080 | [reported against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1247). |
| 1081 | |
| 1082 | |
| 1083 | 1.1.5 (2019-04-01) |
| 1084 | ================== |
| 1085 | This release fixes a bug in regex's dependency specification where it requires |
| 1086 | a newer version of regex-syntax, but this wasn't communicated correctly in the |
| 1087 | Cargo.toml. This would have been caught by a minimal version check, but this |
| 1088 | check was disabled because the `rand` crate itself advertises incorrect |
| 1089 | dependency specifications. |
| 1090 | |
| 1091 | Bug fixes: |
| 1092 | |
| 1093 | * [BUG #570](https://github.com/rust-lang/regex/pull/570): |
| 1094 | Fix regex-syntax minimal version. |
| 1095 | |
| 1096 | |
| 1097 | 1.1.4 (2019-03-31) |
| 1098 | ================== |
| 1099 | This release fixes a backwards compatibility regression where Regex was no |
| 1100 | longer UnwindSafe. This was caused by the upgrade to aho-corasick 0.7, whose |
| 1101 | AhoCorasick type was itself not UnwindSafe. This has been fixed in aho-corasick |
| 1102 | 0.7.4, which we now require. |
| 1103 | |
| 1104 | Bug fixes: |
| 1105 | |
| 1106 | * [BUG #568](https://github.com/rust-lang/regex/pull/568): |
| 1107 | Fix an API regression where Regex was no longer UnwindSafe. |
| 1108 | |
| 1109 | |
| 1110 | 1.1.3 (2019-03-30) |
| 1111 | ================== |
| 1112 | This releases fixes a few bugs and adds a performance improvement when a regex |
| 1113 | is a simple alternation of literals. |
| 1114 | |
| 1115 | Performance improvements: |
| 1116 | |
| 1117 | * [OPT #566](https://github.com/rust-lang/regex/pull/566): |
| 1118 | Upgrades `aho-corasick` to 0.7 and uses it for `foo|bar|...|quux` regexes. |
| 1119 | |
| 1120 | Bug fixes: |
| 1121 | |
| 1122 | * [BUG #527](https://github.com/rust-lang/regex/issues/527): |
| 1123 | Fix a bug where the parser would panic on patterns like `((?x))`. |
| 1124 | * [BUG #555](https://github.com/rust-lang/regex/issues/555): |
| 1125 | Fix a bug where the parser would panic on patterns like `(?m){1,1}`. |
| 1126 | * [BUG #557](https://github.com/rust-lang/regex/issues/557): |
| 1127 | Fix a bug where captures could lead to an incorrect match. |
| 1128 | |
| 1129 | |
| 1130 | 1.1.2 (2019-02-27) |
| 1131 | ================== |
| 1132 | This release fixes a bug found in the fix introduced in 1.1.1. |
| 1133 | |
| 1134 | Bug fixes: |
| 1135 | |
| 1136 | * [BUG edf45e6f](https://github.com/rust-lang/regex/commit/edf45e6f): |
| 1137 | Fix bug introduced in reverse suffix literal matcher in the 1.1.1 release. |
| 1138 | |
| 1139 | |
| 1140 | 1.1.1 (2019-02-27) |
| 1141 | ================== |
| 1142 | This is a small release with one fix for a bug caused by literal optimizations. |
| 1143 | |
| 1144 | Bug fixes: |
| 1145 | |
| 1146 | * [BUG 661bf53d](https://github.com/rust-lang/regex/commit/661bf53d): |
| 1147 | Fixes a bug in the reverse suffix literal optimization. This was originally |
| 1148 | reported |
| 1149 | [against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1203). |
| 1150 | |
| 1151 | |
| 1152 | 1.1.0 (2018-11-30) |
| 1153 | ================== |
| 1154 | This is a small release with a couple small enhancements. This release also |
| 1155 | increases the minimal supported Rust version (MSRV) to 1.24.1 (from 1.20.0). In |
| 1156 | accordance with this crate's MSRV policy, this release bumps the minor version |
| 1157 | number. |
| 1158 | |
| 1159 | Performance improvements: |
| 1160 | |
| 1161 | * [OPT #511](https://github.com/rust-lang/regex/pull/511), |
| 1162 | [OPT #540](https://github.com/rust-lang/regex/pull/540): |
| 1163 | Improve lazy DFA construction for large regex sets. |
| 1164 | |
| 1165 | New features: |
| 1166 | |
| 1167 | * [FEATURE #538](https://github.com/rust-lang/regex/pull/538): |
| 1168 | Add Emoji and "break" Unicode properties. See [UNICODE.md](UNICODE.md). |
| 1169 | |
| 1170 | Bug fixes: |
| 1171 | |
| 1172 | * [BUG #530](https://github.com/rust-lang/regex/pull/530): |
| 1173 | Add Unicode license (for data tables). |
| 1174 | * Various typo/doc fixups. |
| 1175 | |
| 1176 | |
| 1177 | 1.0.6 (2018-11-06) |
| 1178 | ================== |
| 1179 | This is a small release. |
| 1180 | |
| 1181 | Performance improvements: |
| 1182 | |
| 1183 | * [OPT #513](https://github.com/rust-lang/regex/pull/513): |
| 1184 | Improve performance of compiling large Unicode classes by 8-10%. |
| 1185 | |
| 1186 | Bug fixes: |
| 1187 | |
| 1188 | * [BUG #533](https://github.com/rust-lang/regex/issues/533): |
| 1189 | Fix definition of `[[:blank:]]` class that regressed in `regex-syntax 0.5`. |
| 1190 | |
| 1191 | |
| 1192 | 1.0.5 (2018-09-06) |
| 1193 | ================== |
| 1194 | This is a small release with an API enhancement. |
| 1195 | |
| 1196 | New features: |
| 1197 | |
| 1198 | * [FEATURE #509](https://github.com/rust-lang/regex/pull/509): |
| 1199 | Generalize impls of the `Replacer` trait. |
| 1200 | |
| 1201 | |
| 1202 | 1.0.4 (2018-08-25) |
| 1203 | ================== |
| 1204 | This is a small release that bumps the quickcheck dependency. |
| 1205 | |
| 1206 | |
| 1207 | 1.0.3 (2018-08-24) |
| 1208 | ================== |
| 1209 | This is a small bug fix release. |
| 1210 | |
| 1211 | Bug fixes: |
| 1212 | |
| 1213 | * [BUG #504](https://github.com/rust-lang/regex/pull/504): |
| 1214 | Fix for Cargo's "minimal version" support. |
| 1215 | * [BUG 1e39165f](https://github.com/rust-lang/regex/commit/1e39165f): |
| 1216 | Fix doc examples for byte regexes. |
| 1217 | |
| 1218 | |
| 1219 | 1.0.2 (2018-07-18) |
| 1220 | ================== |
| 1221 | This release exposes some new lower level APIs on `Regex` that permit |
| 1222 | amortizing allocation and controlling the location at which a search is |
| 1223 | performed in a more granular way. Most users of the regex crate will not |
| 1224 | need or want to use these APIs. |
| 1225 | |
| 1226 | New features: |
| 1227 | |
| 1228 | * [FEATURE #493](https://github.com/rust-lang/regex/pull/493): |
| 1229 | Add a few lower level APIs for amortizing allocation and more fine-grained |
| 1230 | searching. |
| 1231 | |
| 1232 | Bug fixes: |
| 1233 | |
| 1234 | * [BUG 3981d2ad](https://github.com/rust-lang/regex/commit/3981d2ad): |
| 1235 | Correct outdated documentation on `RegexBuilder::dot_matches_new_line`. |
| 1236 | * [BUG 7ebe4ae0](https://github.com/rust-lang/regex/commit/7ebe4ae0): |
| 1237 | Correct outdated documentation on `Parser::allow_invalid_utf8` in the |
| 1238 | `regex-syntax` crate. |
| 1239 | * [BUG 24c7770b](https://github.com/rust-lang/regex/commit/24c7770b): |
| 1240 | Fix a bug in the HIR printer where it wouldn't correctly escape meta |
| 1241 | characters in character classes. |
| 1242 | |
| 1243 | |
| 1244 | 1.0.1 (2018-06-19) |
| 1245 | ================== |
| 1246 | This release upgrades regex's Unicode tables to Unicode 11, and enables SIMD |
| 1247 | optimizations automatically on Rust stable (1.27 or newer). |
| 1248 | |
| 1249 | New features: |
| 1250 | |
| 1251 | * [FEATURE #486](https://github.com/rust-lang/regex/pull/486): |
| 1252 | Implement `size_hint` on `RegexSet` match iterators. |
| 1253 | * [FEATURE #488](https://github.com/rust-lang/regex/pull/488): |
| 1254 | Update Unicode tables for Unicode 11. |
| 1255 | * [FEATURE #490](https://github.com/rust-lang/regex/pull/490): |
| 1256 | SIMD optimizations are now enabled automatically in Rust stable, for versions |
| 1257 | 1.27 and up. No compilation flags or features need to be set. CPU support |
| 1258 | SIMD is detected automatically at runtime. |
| 1259 | |
| 1260 | Bug fixes: |
| 1261 | |
| 1262 | * [BUG #482](https://github.com/rust-lang/regex/pull/482): |
| 1263 | Present a better compilation error when the `use_std` feature isn't used. |
| 1264 | |
| 1265 | |
| 1266 | 1.0.0 (2018-05-01) |
| 1267 | ================== |
| 1268 | This release marks the 1.0 release of regex. |
| 1269 | |
| 1270 | While this release includes some breaking changes, most users of older versions |
| 1271 | of the regex library should be able to migrate to 1.0 by simply bumping the |
| 1272 | version number. The important changes are as follows: |
| 1273 | |
| 1274 | * We adopt Rust 1.20 as the new minimum supported version of Rust for regex. |
| 1275 | We also tentatively adopt a policy that permits bumping the minimum supported |
| 1276 | version of Rust in minor version releases of regex, but no patch releases. |
| 1277 | That is, with respect to semver, we do not strictly consider bumping the |
| 1278 | minimum version of Rust to be a breaking change, but adopt a conservative |
| 1279 | stance as a compromise. |
| 1280 | * Octal syntax in regular expressions has been disabled by default. This |
| 1281 | permits better error messages that inform users that backreferences aren't |
| 1282 | available. Octal syntax can be re-enabled via the corresponding option on |
| 1283 | `RegexBuilder`. |
| 1284 | * `(?-u:\B)` is no longer allowed in Unicode regexes since it can match at |
| 1285 | invalid UTF-8 code unit boundaries. `(?-u:\b)` is still allowed in Unicode |
| 1286 | regexes. |
| 1287 | * The `From<regex_syntax::Error>` impl has been removed. This formally removes |
| 1288 | the public dependency on `regex-syntax`. |
| 1289 | * A new feature, `use_std`, has been added and enabled by default. Disabling |
| 1290 | the feature will result in a compilation error. In the future, this may |
| 1291 | permit us to support `no_std` environments (w/ `alloc`) in a backwards |
| 1292 | compatible way. |
| 1293 | |
| 1294 | For more information and discussion, please see |
| 1295 | [1.0 release tracking issue](https://github.com/rust-lang/regex/issues/457). |
| 1296 | |
| 1297 | |
| 1298 | 0.2.11 (2018-05-01) |
| 1299 | =================== |
| 1300 | This release primarily contains bug fixes. Some of them resolve bugs where |
| 1301 | the parser could panic. |
| 1302 | |
| 1303 | New features: |
| 1304 | |
| 1305 | * [FEATURE #459](https://github.com/rust-lang/regex/pull/459): |
| 1306 | Include C++'s standard regex library and Boost's regex library in the |
| 1307 | benchmark harness. We now include D/libphobos, C++/std, C++/boost, Oniguruma, |
| 1308 | PCRE1, PCRE2, RE2 and Tcl in the harness. |
| 1309 | |
| 1310 | Bug fixes: |
| 1311 | |
| 1312 | * [BUG #445](https://github.com/rust-lang/regex/issues/445): |
| 1313 | Clarify order of indices returned by RegexSet match iterator. |
| 1314 | * [BUG #461](https://github.com/rust-lang/regex/issues/461): |
| 1315 | Improve error messages for invalid regexes like `[\d-a]`. |
| 1316 | * [BUG #464](https://github.com/rust-lang/regex/issues/464): |
| 1317 | Fix a bug in the error message pretty printer that could cause a panic when |
| 1318 | a regex contained a literal `\n` character. |
| 1319 | * [BUG #465](https://github.com/rust-lang/regex/issues/465): |
| 1320 | Fix a panic in the parser that was caused by applying a repetition operator |
| 1321 | to `(?flags)`. |
| 1322 | * [BUG #466](https://github.com/rust-lang/regex/issues/466): |
| 1323 | Fix a bug where `\pC` was not recognized as an alias for `\p{Other}`. |
| 1324 | * [BUG #470](https://github.com/rust-lang/regex/pull/470): |
| 1325 | Fix a bug where literal searches did more work than necessary for anchored |
| 1326 | regexes. |
| 1327 | |
| 1328 | |
| 1329 | 0.2.10 (2018-03-16) |
| 1330 | =================== |
| 1331 | This release primarily updates the regex crate to changes made in `std::arch` |
| 1332 | on nightly Rust. |
| 1333 | |
| 1334 | New features: |
| 1335 | |
| 1336 | * [FEATURE #458](https://github.com/rust-lang/regex/pull/458): |
| 1337 | The `Hir` type in `regex-syntax` now has a printer. |
| 1338 | |
| 1339 | |
| 1340 | 0.2.9 (2018-03-12) |
| 1341 | ================== |
| 1342 | This release introduces a new nightly only feature, `unstable`, which enables |
| 1343 | SIMD optimizations for certain types of regexes. No additional compile time |
| 1344 | options are necessary, and the regex crate will automatically choose the |
| 1345 | best CPU features at run time. As a result, the `simd` (nightly only) crate |
| 1346 | dependency has been dropped. |
| 1347 | |
| 1348 | New features: |
| 1349 | |
| 1350 | * [FEATURE #456](https://github.com/rust-lang/regex/pull/456): |
| 1351 | The regex crate now includes AVX2 optimizations in addition to the extant |
| 1352 | SSSE3 optimization. |
| 1353 | |
| 1354 | Bug fixes: |
| 1355 | |
| 1356 | * [BUG #455](https://github.com/rust-lang/regex/pull/455): |
| 1357 | Fix a bug where `(?x)[ / - ]` failed to parse. |
| 1358 | |
| 1359 | |
| 1360 | 0.2.8 (2018-03-12) |
| 1361 | ================== |
| 1362 | Bug fixes: |
| 1363 | |
| 1364 | * [BUG #454](https://github.com/rust-lang/regex/pull/454): |
| 1365 | Fix a bug in the nest limit checker being too aggressive. |
| 1366 | |
| 1367 | |
| 1368 | 0.2.7 (2018-03-07) |
| 1369 | ================== |
| 1370 | This release includes a ground-up rewrite of the regex-syntax crate, which has |
| 1371 | been in development for over a year. |
| 1372 | 731 |
| 1373 | New features: |
| 1374 | |
| 1375 | * Error messages for invalid regexes have been greatly improved. You get these |
| 1376 | automatically; you don't need to do anything. In addition to better |
| 1377 | formatting, error messages will now explicitly call out the use of look |
| 1378 | around. When regex 1.0 is released, this will happen for backreferences as |
| 1379 | well. |
| 1380 | * Full support for intersection, difference and symmetric difference of |
| 1381 | character classes. These can be used via the `&&`, `--` and `~~` binary |
| 1382 | operators within classes. |
| 1383 | * A Unicode Level 1 conformant implementation of `\p{..}` character classes. |
| 1384 | Things like `\p{scx:Hira}`, `\p{age:3.2}` or `\p{Changes_When_Casefolded}` |
| 1385 | now work. All property name and value aliases are supported, and properties |
| 1386 | are selected via loose matching. e.g., `\p{Greek}` is the same as |
| 1387 | `\p{G r E e K}`. |
| 1388 | * A new `UNICODE.md` document has been added to this repository that |
| 1389 | exhaustively documents support for UTS#18. |
| 1390 | * Empty sub-expressions are now permitted in most places. That is, `()+` is |
| 1391 | now a valid regex. |
| 1392 | * Almost everything in regex-syntax now uses constant stack space, even when |
| 1393 | performing analysis that requires structural induction. This reduces the risk |
| 1394 | of a user provided regular expression causing a stack overflow. |
| 1395 | * [FEATURE #174](https://github.com/rust-lang/regex/issues/174): |
| 1396 | The `Ast` type in `regex-syntax` now contains span information. |
| 1397 | * [FEATURE #424](https://github.com/rust-lang/regex/issues/424): |
| 1398 | Support `\u`, `\u{...}`, `\U` and `\U{...}` syntax for specifying code points |
| 1399 | in a regular expression. |
| 1400 | * [FEATURE #449](https://github.com/rust-lang/regex/pull/449): |
| 1401 | Add a `Replace::by_ref` adapter for use of a replacer without consuming it. |
| 1402 | |
| 1403 | Bug fixes: |
| 1404 | |
| 1405 | * [BUG #446](https://github.com/rust-lang/regex/issues/446): |
| 1406 | We re-enable the Boyer-Moore literal matcher. |
| 1407 | |
| 1408 | |
| 1409 | 0.2.6 (2018-02-08) |
| 1410 | ================== |
| 1411 | Bug fixes: |
| 1412 | |
| 1413 | * [BUG #446](https://github.com/rust-lang/regex/issues/446): |
| 1414 | Fixes a bug in the new Boyer-Moore searcher that results in a match failure. |
| 1415 | We fix this bug by temporarily disabling Boyer-Moore. |
| 1416 | |
| 1417 | |
| 1418 | 0.2.5 (2017-12-30) |
| 1419 | ================== |
| 1420 | Bug fixes: |
| 1421 | |
| 1422 | * [BUG #437](https://github.com/rust-lang/regex/issues/437): |
| 1423 | Fixes a bug in the new Boyer-Moore searcher that results in a panic. |
| 1424 | |
| 1425 | |
| 1426 | 0.2.4 (2017-12-30) |
| 1427 | ================== |
| 1428 | New features: |
| 1429 | |
| 1430 | * [FEATURE #348](https://github.com/rust-lang/regex/pull/348): |
| 1431 | Improve performance for capture searches on anchored regex. |
| 1432 | (Contributed by @ethanpailes. Nice work!) |
| 1433 | * [FEATURE #419](https://github.com/rust-lang/regex/pull/419): |
| 1434 | Expand literal searching to include Tuned Boyer-Moore in some cases. |
| 1435 | (Contributed by @ethanpailes. Nice work!) |
| 1436 | |
| 1437 | Bug fixes: |
| 1438 | |
| 1439 | * [BUG](https://github.com/rust-lang/regex/pull/436): |
| 1440 | The regex compiler plugin has been removed. |
| 1441 | * [BUG](https://github.com/rust-lang/regex/pull/436): |
| 1442 | `simd` has been bumped to `0.2.1`, which fixes a Rust nightly build error. |
| 1443 | * [BUG](https://github.com/rust-lang/regex/pull/436): |
| 1444 | Bring the benchmark harness up to date. |
| 1445 | |
| 1446 | |
| 1447 | 0.2.3 (2017-11-30) |
| 1448 | ================== |
| 1449 | New features: |
| 1450 | |
| 1451 | * [FEATURE #374](https://github.com/rust-lang/regex/pull/374): |
| 1452 | Add `impl From<Match> for &str`. |
| 1453 | * [FEATURE #380](https://github.com/rust-lang/regex/pull/380): |
| 1454 | Derive `Clone` and `PartialEq` on `Error`. |
| 1455 | * [FEATURE #400](https://github.com/rust-lang/regex/pull/400): |
| 1456 | Update to Unicode 10. |
| 1457 | |
| 1458 | Bug fixes: |
| 1459 | |
| 1460 | * [BUG #375](https://github.com/rust-lang/regex/issues/375): |
| 1461 | Fix a bug that prevented the bounded backtracker from terminating. |
| 1462 | * [BUG #393](https://github.com/rust-lang/regex/issues/393), |
| 1463 | [BUG #394](https://github.com/rust-lang/regex/issues/394): |
| 1464 | Fix bug with `replace` methods for empty matches. |
| 1465 | |
| 1466 | |
| 1467 | 0.2.2 (2017-05-21) |
| 1468 | ================== |
| 1469 | New features: |
| 1470 | |
| 1471 | * [FEATURE #341](https://github.com/rust-lang/regex/issues/341): |
| 1472 | Support nested character classes and intersection operation. |
| 1473 | For example, `[\p{Greek}&&\pL]` matches greek letters and |
| 1474 | `[[0-9]&&[^4]]` matches every decimal digit except `4`. |
| 1475 | (Much thanks to @robinst, who contributed this awesome feature.) |
| 1476 | |
| 1477 | Bug fixes: |
| 1478 | |
| 1479 | * [BUG #321](https://github.com/rust-lang/regex/issues/321): |
| 1480 | Fix bug in literal extraction and UTF-8 decoding. |
| 1481 | * [BUG #326](https://github.com/rust-lang/regex/issues/326): |
| 1482 | Add documentation tip about the `(?x)` flag. |
| 1483 | * [BUG #333](https://github.com/rust-lang/regex/issues/333): |
| 1484 | Show additional replacement example using curly braces. |
| 1485 | * [BUG #334](https://github.com/rust-lang/regex/issues/334): |
| 1486 | Fix bug when resolving captures after a match. |
| 1487 | * [BUG #338](https://github.com/rust-lang/regex/issues/338): |
| 1488 | Add example that uses `Captures::get` to API documentation. |
| 1489 | * [BUG #353](https://github.com/rust-lang/regex/issues/353): |
| 1490 | Fix RegexSet bug that caused match failure in some cases. |
| 1491 | * [BUG #354](https://github.com/rust-lang/regex/pull/354): |
| 1492 | Fix panic in parser when `(?x)` is used. |
| 1493 | * [BUG #358](https://github.com/rust-lang/regex/issues/358): |
| 1494 | Fix literal optimization bug with RegexSet. |
| 1495 | * [BUG #359](https://github.com/rust-lang/regex/issues/359): |
| 1496 | Fix example code in README. |
| 1497 | * [BUG #365](https://github.com/rust-lang/regex/pull/365): |
| 1498 | Fix bug in `rure_captures_len` in the C binding. |
| 1499 | * [BUG #367](https://github.com/rust-lang/regex/issues/367): |
| 1500 | Fix byte class bug that caused a panic. |
| 1501 | |
| 1502 | |
| 1503 | 0.2.1 |
| 1504 | ===== |
| 1505 | One major bug with `replace_all` has been fixed along with a couple of other |
| 1506 | touch-ups. |
| 1507 | |
| 1508 | * [BUG #312](https://github.com/rust-lang/regex/issues/312): |
| 1509 | Fix documentation for `NoExpand` to reference correct lifetime parameter. |
| 1510 | * [BUG #314](https://github.com/rust-lang/regex/issues/314): |
| 1511 | Fix a bug with `replace_all` when replacing a match with the empty string. |
| 1512 | * [BUG #316](https://github.com/rust-lang/regex/issues/316): |
| 1513 | Note a missing breaking change from the `0.2.0` CHANGELOG entry. |
| 1514 | (`RegexBuilder::compile` was renamed to `RegexBuilder::build`.) |
| 1515 | * [BUG #324](https://github.com/rust-lang/regex/issues/324): |
| 1516 | Compiling `regex` should only require one version of `memchr` crate. |
| 1517 | |
| 1518 | |
| 1519 | 0.2.0 |
| 1520 | ===== |
| 1521 | This is a new major release of the regex crate, and is an implementation of the |
| 1522 | [regex 1.0 RFC](https://github.com/rust-lang/rfcs/blob/master/text/1620-regex-1.0.md). |
| 1523 | We are releasing a `0.2` first, and if there are no major problems, we will |
| 1524 | release a `1.0` shortly. For `0.2`, the minimum *supported* Rust version is |
| 1525 | 1.12. |
| 1526 | |
| 1527 | There are a number of **breaking changes** in `0.2`. They are split into two |
| 1528 | types. The first type correspond to breaking changes in regular expression |
| 1529 | syntax. The second type correspond to breaking changes in the API. |
| 1530 | |
| 1531 | Breaking changes for regex syntax: |
| 1532 | |
| 1533 | * POSIX character classes now require double bracketing. Previously, the regex |
| 1534 | `[:upper:]` would parse as the `upper` POSIX character class. Now it parses |
| 1535 | as the character class containing the characters `:upper:`. The fix to this |
| 1536 | change is to use `[[:upper:]]` instead. Note that variants like |
| 1537 | `[[:upper:][:blank:]]` continue to work. |
| 1538 | * The character `[` must always be escaped inside a character class. |
| 1539 | * The characters `&`, `-` and `~` must be escaped if any one of them are |
| 1540 | repeated consecutively. For example, `[&]`, `[\&]`, `[\&\&]`, `[&-&]` are all |
| 1541 | equivalent while `[&&]` is illegal. (The motivation for this and the prior |
| 1542 | change is to provide a backwards compatible path for adding character class |
| 1543 | set notation.) |
| 1544 | * A `bytes::Regex` now has Unicode mode enabled by default (like the main |
| 1545 | `Regex` type). This means regexes compiled with `bytes::Regex::new` that |
| 1546 | don't have the Unicode flag set should add `(?-u)` to recover the original |
| 1547 | behavior. |
| 1548 | |
| 1549 | Breaking changes for the regex API: |
| 1550 | |
| 1551 | * `find` and `find_iter` now **return `Match` values instead of |
| 1552 | `(usize, usize)`.** `Match` values have `start` and `end` methods, which |
| 1553 | return the match offsets. `Match` values also have an `as_str` method, |
| 1554 | which returns the text of the match itself. |
| 1555 | * The `Captures` type now only provides a single iterator over all capturing |
| 1556 | matches, which should replace uses of `iter` and `iter_pos`. Uses of |
| 1557 | `iter_named` should use the `capture_names` method on `Regex`. |
| 1558 | * The `at` method on the `Captures` type has been renamed to `get`, and it |
| 1559 | now returns a `Match`. Similarly, the `name` method on `Captures` now returns |
| 1560 | a `Match`. |
| 1561 | * The `replace` methods now return `Cow` values. The `Cow::Borrowed` variant |
| 1562 | is returned when no replacements are made. |
| 1563 | * The `Replacer` trait has been completely overhauled. This should only |
| 1564 | impact clients that implement this trait explicitly. Standard uses of |
| 1565 | the `replace` methods should continue to work unchanged. If you implement |
| 1566 | the `Replacer` trait, please consult the new documentation. |
| 1567 | * The `quote` free function has been renamed to `escape`. |
| 1568 | * The `Regex::with_size_limit` method has been removed. It is replaced by |
| 1569 | `RegexBuilder::size_limit`. |
| 1570 | * The `RegexBuilder` type has switched from owned `self` method receivers to |
| 1571 | `&mut self` method receivers. Most uses will continue to work unchanged, but |
| 1572 | some code may require naming an intermediate variable to hold the builder. |
| 1573 | * The `compile` method on `RegexBuilder` has been renamed to `build`. |
| 1574 | * The free `is_match` function has been removed. It is replaced by compiling |
| 1575 | a `Regex` and calling its `is_match` method. |
| 1576 | * The `PartialEq` and `Eq` impls on `Regex` have been dropped. If you relied |
| 1577 | on these impls, the fix is to define a wrapper type around `Regex`, impl |
| 1578 | `Deref` on it and provide the necessary impls. |
| 1579 | * The `is_empty` method on `Captures` has been removed. This always returns |
| 1580 | `false`, so its use is superfluous. |
| 1581 | * The `Syntax` variant of the `Error` type now contains a string instead of |
| 1582 | a `regex_syntax::Error`. If you were examining syntax errors more closely, |
| 1583 | you'll need to explicitly use the `regex_syntax` crate to re-parse the regex. |
| 1584 | * The `InvalidSet` variant of the `Error` type has been removed since it is |
| 1585 | no longer used. |
| 1586 | * Most of the iterator types have been renamed to match conventions. If you |
| 1587 | were using these iterator types explicitly, please consult the documentation |
| 1588 | for its new name. For example, `RegexSplits` has been renamed to `Split`. |
| 1589 | |
| 1590 | A number of bugs have been fixed: |
| 1591 | |
| 1592 | * [BUG #151](https://github.com/rust-lang/regex/issues/151): |
| 1593 | The `Replacer` trait has been changed to permit the caller to control |
| 1594 | allocation. |
| 1595 | * [BUG #165](https://github.com/rust-lang/regex/issues/165): |
| 1596 | Remove the free `is_match` function. |
| 1597 | * [BUG #166](https://github.com/rust-lang/regex/issues/166): |
| 1598 | Expose more knobs (available in `0.1`) and remove `with_size_limit`. |
| 1599 | * [BUG #168](https://github.com/rust-lang/regex/issues/168): |
| 1600 | Iterators produced by `Captures` now have the correct lifetime parameters. |
| 1601 | * [BUG #175](https://github.com/rust-lang/regex/issues/175): |
| 1602 | Fix a corner case in the parsing of POSIX character classes. |
| 1603 | * [BUG #178](https://github.com/rust-lang/regex/issues/178): |
| 1604 | Drop the `PartialEq` and `Eq` impls on `Regex`. |
| 1605 | * [BUG #179](https://github.com/rust-lang/regex/issues/179): |
| 1606 | Remove `is_empty` from `Captures` since it always returns false. |
| 1607 | * [BUG #276](https://github.com/rust-lang/regex/issues/276): |
| 1608 | Position of named capture can now be retrieved from a `Captures`. |
| 1609 | * [BUG #296](https://github.com/rust-lang/regex/issues/296): |
| 1610 | Remove winapi/kernel32-sys dependency on UNIX. |
| 1611 | * [BUG #307](https://github.com/rust-lang/regex/issues/307): |
| 1612 | Fix error on emscripten. |
| 1613 | |
| 1614 | |
| 1615 | 0.1.80 |
| 1616 | ====== |
| 1617 | * [PR #292](https://github.com/rust-lang/regex/pull/292): |
| 1618 | Fixes bug #291, which was introduced by PR #290. |
| 1619 | |
| 1620 | 0.1.79 |
| 1621 | ====== |
| 1622 | * Require regex-syntax 0.3.8. |
| 1623 | |
| 1624 | 0.1.78 |
| 1625 | ====== |
| 1626 | * [PR #290](https://github.com/rust-lang/regex/pull/290): |
| 1627 | Fixes bug #289, which caused some regexes with a certain combination |
| 1628 | of literals to match incorrectly. |
| 1629 | |
| 1630 | 0.1.77 |
| 1631 | ====== |
| 1632 | * [PR #281](https://github.com/rust-lang/regex/pull/281): |
| 1633 | Fixes bug #280 by disabling all literal optimizations when a pattern |
| 1634 | is partially anchored. |
| 1635 | |
| 1636 | 0.1.76 |
| 1637 | ====== |
| 1638 | * Tweak criteria for using the Teddy literal matcher. |
| 1639 | |
| 1640 | 0.1.75 |
| 1641 | ====== |
| 1642 | * [PR #275](https://github.com/rust-lang/regex/pull/275): |
| 1643 | Improves match verification performance in the Teddy SIMD searcher. |
| 1644 | * [PR #278](https://github.com/rust-lang/regex/pull/278): |
| 1645 | Replaces slow substring loop in the Teddy SIMD searcher with Aho-Corasick. |
| 1646 | * Implemented DoubleEndedIterator on regex set match iterators. |
| 1647 | |
| 1648 | 0.1.74 |
| 1649 | ====== |
| 1650 | * Release regex-syntax 0.3.5 with a minor bug fix. |
| 1651 | * Fix bug #272. |
| 1652 | * Fix bug #277. |
| 1653 | * [PR #270](https://github.com/rust-lang/regex/pull/270): |
| 1654 | Fixes bugs #264, #268 and an unreported where the DFA cache size could be |
| 1655 | drastically underestimated in some cases (leading to high unexpected memory |
| 1656 | usage). |
| 1657 | |
| 1658 | 0.1.73 |
| 1659 | ====== |
| 1660 | * Release `regex-syntax 0.3.4`. |
| 1661 | * Bump `regex-syntax` dependency version for `regex` to `0.3.4`. |
| 1662 | |
| 1663 | 0.1.72 |
| 1664 | ====== |
| 1665 | * [PR #262](https://github.com/rust-lang/regex/pull/262): |
| 1666 | Fixes a number of small bugs caught by fuzz testing (AFL). |
| 1667 | |
| 1668 | 0.1.71 |
| 1669 | ====== |
| 1670 | * [PR #236](https://github.com/rust-lang/regex/pull/236): |
| 1671 | Fix a bug in how suffix literals were extracted, which could lead |
| 1672 | to invalid match behavior in some cases. |
| 1673 | |
| 1674 | 0.1.70 |
| 1675 | ====== |
| 1676 | * [PR #231](https://github.com/rust-lang/regex/pull/231): |
| 1677 | Add SIMD accelerated multiple pattern search. |
| 1678 | * [PR #228](https://github.com/rust-lang/regex/pull/228): |
| 1679 | Reintroduce the reverse suffix literal optimization. |
| 1680 | * [PR #226](https://github.com/rust-lang/regex/pull/226): |
| 1681 | Implements NFA state compression in the lazy DFA. |
| 1682 | * [PR #223](https://github.com/rust-lang/regex/pull/223): |
| 1683 | A fully anchored RegexSet can now short-circuit. |
| 1684 | |
| 1685 | 0.1.69 |
| 1686 | ====== |
| 1687 | * [PR #216](https://github.com/rust-lang/regex/pull/216): |
| 1688 | Tweak the threshold for running backtracking. |
| 1689 | * [PR #217](https://github.com/rust-lang/regex/pull/217): |
| 1690 | Add upper limit (from the DFA) to capture search (for the NFA). |
| 1691 | * [PR #218](https://github.com/rust-lang/regex/pull/218): |
| 1692 | Add rure, a C API. |
| 1693 | |
| 1694 | 0.1.68 |
| 1695 | ====== |
| 1696 | * [PR #210](https://github.com/rust-lang/regex/pull/210): |
| 1697 | Fixed a performance bug in `bytes::Regex::replace` where `extend` was used |
| 1698 | instead of `extend_from_slice`. |
| 1699 | * [PR #211](https://github.com/rust-lang/regex/pull/211): |
| 1700 | Fixed a bug in the handling of word boundaries in the DFA. |
| 1701 | * [PR #213](https://github.com/rust-lang/pull/213): |
| 1702 | Added RE2 and Tcl to the benchmark harness. Also added a CLI utility from |
| 1703 | running regexes using any of the following regex engines: PCRE1, PCRE2, |
| 1704 | Oniguruma, RE2, Tcl and of course Rust's own regexes. |
| 1705 | |
| 1706 | 0.1.67 |
| 1707 | ====== |
| 1708 | * [PR #201](https://github.com/rust-lang/regex/pull/201): |
| 1709 | Fix undefined behavior in the `regex!` compiler plugin macro. |
| 1710 | * [PR #205](https://github.com/rust-lang/regex/pull/205): |
| 1711 | More improvements to DFA performance. Competitive with RE2. See PR for |
| 1712 | benchmarks. |
| 1713 | * [PR #209](https://github.com/rust-lang/regex/pull/209): |
| 1714 | Release 0.1.66 was semver incompatible since it required a newer version |
| 1715 | of Rust than previous releases. This PR fixes that. (And `0.1.66` was |
| 1716 | yanked.) |
| 1717 | |
| 1718 | 0.1.66 |
| 1719 | ====== |
| 1720 | * Speculative support for Unicode word boundaries was added to the DFA. This |
| 1721 | should remove the last common case that disqualified use of the DFA. |
| 1722 | * An optimization that scanned for suffix literals and then matched the regular |
| 1723 | expression in reverse was removed because it had worst case quadratic time |
| 1724 | complexity. It was replaced with a more limited optimization where, given any |
| 1725 | regex of the form `re$`, it will be matched in reverse from the end of the |
| 1726 | haystack. |
| 1727 | * [PR #202](https://github.com/rust-lang/regex/pull/202): |
| 1728 | The inner loop of the DFA was heavily optimized to improve cache locality |
| 1729 | and reduce the overall number of instructions run on each iteration. This |
| 1730 | represents the first use of `unsafe` in `regex` (to elide bounds checks). |
| 1731 | * [PR #200](https://github.com/rust-lang/regex/pull/200): |
| 1732 | Use of the `mempool` crate (which used thread local storage) was replaced |
| 1733 | with a faster version of a similar API in @Amanieu's `thread_local` crate. |
| 1734 | It should reduce contention when using a regex from multiple threads |
| 1735 | simultaneously. |
| 1736 | * PCRE2 JIT benchmarks were added. A benchmark comparison can be found |
| 1737 | [here](https://gist.github.com/anonymous/14683c01993e91689f7206a18675901b). |
| 1738 | (Includes a comparison with PCRE1's JIT and Oniguruma.) |
| 1739 | * A bug where word boundaries weren't being matched correctly in the DFA was |
| 1740 | fixed. This only affected use of `bytes::Regex`. |
| 1741 | * [#160](https://github.com/rust-lang/regex/issues/160): |
| 1742 | `Captures` now has a `Debug` impl. |