]> git.proxmox.com Git - rustc.git/blob - vendor/regex-1.4.6/CHANGELOG.md
New upstream version 1.55.0+dfsg1
[rustc.git] / vendor / regex-1.4.6 / CHANGELOG.md
1 1.4.6 (2021-04-22)
2 ==================
3 This is a small patch release that fixes the compiler's size check on how much
4 heap memory a regex uses. Previously, the compiler did not account for the
5 heap usage of Unicode character classes. Now it does. It's possible that this
6 may make some regexes fail to compile that previously did compile. If that
7 happens, please file an issue.
8
9 * [BUG OSS-fuzz#33579](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33579):
10 Some regexes can use more heap memory than one would expect.
11
12
13 1.4.5 (2021-03-14)
14 ==================
15 This is a small patch release that fixes a regression in the size of a `Regex`
16 in the 1.4.4 release. Prior to 1.4.4, a `Regex` was 552 bytes. In the 1.4.4
17 release, it was 856 bytes due to internal changes. In this release, a `Regex`
18 is now 16 bytes. In general, the size of a `Regex` was never something that was
19 on my radar, but this increased size in the 1.4.4 release seems to have crossed
20 a threshold and resulted in stack overflows in some programs.
21
22 * [BUG #750](https://github.com/rust-lang/regex/pull/750):
23 Fixes stack overflows seemingly caused by a large `Regex` size by decreasing
24 its size.
25
26
27 1.4.4 (2021-03-11)
28 ==================
29 This is a small patch release that contains some bug fixes. Notably, it also
30 drops the `thread_local` (and `lazy_static`, via transitivity) dependencies.
31
32 Bug fixes:
33
34 * [BUG #362](https://github.com/rust-lang/regex/pull/362):
35 Memory leaks caused by an internal caching strategy should now be fixed.
36 * [BUG #576](https://github.com/rust-lang/regex/pull/576):
37 All regex types now implement `UnwindSafe` and `RefUnwindSafe`.
38 * [BUG #728](https://github.com/rust-lang/regex/pull/749):
39 Add missing `Replacer` impls for `Vec<u8>`, `String`, `Cow`, etc.
40
41
42 1.4.3 (2021-01-08)
43 ==================
44 This is a small patch release that adds some missing standard trait
45 implementations for some types in the public API.
46
47 Bug fixes:
48
49 * [BUG #734](https://github.com/rust-lang/regex/pull/734):
50 Add `FusedIterator` and `ExactSizeIterator` impls to iterator types.
51 * [BUG #735](https://github.com/rust-lang/regex/pull/735):
52 Add missing `Debug` impls to public API types.
53
54
55 1.4.2 (2020-11-01)
56 ==================
57 This is a small bug fix release that bans `\P{any}`. We previously banned empty
58 classes like `[^\w\W]`, but missed the `\P{any}` case. In the future, we hope
59 to permit empty classes.
60
61 * [BUG #722](https://github.com/rust-lang/regex/issues/722):
62 Ban `\P{any}` to avoid a panic in the regex compiler. Found by OSS-Fuzz.
63
64
65 1.4.1 (2020-10-13)
66 ==================
67 This is a small bug fix release that makes `\p{cf}` work. Previously, it would
68 report "property not found" even though `cf` is a valid abbreviation for the
69 `Format` general category.
70
71 * [BUG #719](https://github.com/rust-lang/regex/issues/719):
72 Fixes bug that prevented `\p{cf}` from working.
73
74
75 1.4.0 (2020-10-11)
76 ==================
77 This releases has a few minor documentation fixes as well as some very minor
78 API additions. The MSRV remains at Rust 1.28 for now, but this is intended to
79 increase to at least Rust 1.41.1 soon.
80
81 This release also adds support for OSS-Fuzz. Kudos to
82 [@DavidKorczynski](https://github.com/DavidKorczynski)
83 for doing the heavy lifting for that!
84
85 New features:
86
87 * [FEATURE #649](https://github.com/rust-lang/regex/issues/649):
88 Support `[`, `]` and `.` in capture group names.
89 * [FEATURE #687](https://github.com/rust-lang/regex/issues/687):
90 Add `is_empty` predicate to `RegexSet`.
91 * [FEATURE #689](https://github.com/rust-lang/regex/issues/689):
92 Implement `Clone` for `SubCaptureMatches`.
93 * [FEATURE #715](https://github.com/rust-lang/regex/issues/715):
94 Add `empty` constructor to `RegexSet` for convenience.
95
96 Bug fixes:
97
98 * [BUG #694](https://github.com/rust-lang/regex/issues/694):
99 Fix doc example for `Replacer::replace_append`.
100 * [BUG #698](https://github.com/rust-lang/regex/issues/698):
101 Clarify docs for `s` flag when using a `bytes::Regex`.
102 * [BUG #711](https://github.com/rust-lang/regex/issues/711):
103 Clarify `is_match` docs to indicate that it can match anywhere in string.
104
105
106 1.3.9 (2020-05-28)
107 ==================
108 This release fixes a MSRV (Minimum Support Rust Version) regression in the
109 1.3.8 release. Namely, while 1.3.8 compiles on Rust 1.28, it actually does not
110 compile on other Rust versions, such as Rust 1.39.
111
112 Bug fixes:
113
114 * [BUG #685](https://github.com/rust-lang/regex/issues/685):
115 Remove use of `doc_comment` crate, which cannot be used before Rust 1.43.
116
117
118 1.3.8 (2020-05-28)
119 ==================
120 This release contains a couple of important bug fixes driven
121 by better support for empty-subexpressions in regexes. For
122 example, regexes like `b|` are now allowed. Major thanks to
123 [@sliquister](https://github.com/sliquister) for implementing support for this
124 in [#677](https://github.com/rust-lang/regex/pull/677).
125
126 Bug fixes:
127
128 * [BUG #523](https://github.com/rust-lang/regex/pull/523):
129 Add note to documentation that spaces can be escaped in `x` mode.
130 * [BUG #524](https://github.com/rust-lang/regex/issues/524):
131 Add support for empty sub-expressions, including empty alternations.
132 * [BUG #659](https://github.com/rust-lang/regex/issues/659):
133 Fix match bug caused by an empty sub-expression miscompilation.
134
135
136 1.3.7 (2020-04-17)
137 ==================
138 This release contains a small bug fix that fixes how `regex` forwards crate
139 features to `regex-syntax`. In particular, this will reduce recompilations in
140 some cases.
141
142 Bug fixes:
143
144 * [BUG #665](https://github.com/rust-lang/regex/pull/665):
145 Fix feature forwarding to `regex-syntax`.
146
147
148 1.3.6 (2020-03-24)
149 ==================
150 This release contains a sizable (~30%) performance improvement when compiling
151 some kinds of large regular expressions.
152
153 Performance improvements:
154
155 * [PERF #657](https://github.com/rust-lang/regex/pull/657):
156 Improvement performance of compiling large regular expressions.
157
158
159 1.3.5 (2020-03-12)
160 ==================
161 This release updates this crate to Unicode 13.
162
163 New features:
164
165 * [FEATURE #653](https://github.com/rust-lang/regex/pull/653):
166 Update `regex-syntax` to Unicode 13.
167
168
169 1.3.4 (2020-01-30)
170 ==================
171 This is a small bug fix release that fixes a bug related to the scoping of
172 flags in a regex. Namely, before this fix, a regex like `((?i)a)b)` would
173 match `aB` despite the fact that `b` should not be matched case insensitively.
174
175 Bug fixes:
176
177 * [BUG #640](https://github.com/rust-lang/regex/issues/640):
178 Fix bug related to the scoping of flags in a regex.
179
180
181 1.3.3 (2020-01-09)
182 ==================
183 This is a small maintenance release that upgrades the dependency on
184 `thread_local` from `0.3` to `1.0`. The minimum supported Rust version remains
185 at Rust 1.28.
186
187
188 1.3.2 (2020-01-09)
189 ==================
190 This is a small maintenance release with some house cleaning and bug fixes.
191
192 New features:
193
194 * [FEATURE #631](https://github.com/rust-lang/regex/issues/631):
195 Add a `Match::range` method an a `From<Match> for Range` impl.
196
197 Bug fixes:
198
199 * [BUG #521](https://github.com/rust-lang/regex/issues/521):
200 Corrects `/-/.splitn("a", 2)` to return `["a"]` instead of `["a", ""]`.
201 * [BUG #594](https://github.com/rust-lang/regex/pull/594):
202 Improve error reporting when writing `\p\`.
203 * [BUG #627](https://github.com/rust-lang/regex/issues/627):
204 Corrects `/-/.split("a-")` to return `["a", ""]` instead of `["a"]`.
205 * [BUG #633](https://github.com/rust-lang/regex/pull/633):
206 Squash deprecation warnings for the `std::error::Error::description` method.
207
208
209 1.3.1 (2019-09-04)
210 ==================
211 This is a maintenance release with no changes in order to try to work-around
212 a [docs.rs/Cargo issue](https://github.com/rust-lang/docs.rs/issues/400).
213
214
215 1.3.0 (2019-09-03)
216 ==================
217 This release adds a plethora of new crate features that permit users of regex
218 to shrink its size considerably, in exchange for giving up either functionality
219 (such as Unicode support) or runtime performance. When all such features are
220 disabled, the dependency tree for `regex` shrinks to exactly 1 crate
221 (`regex-syntax`). More information about the new crate features can be
222 [found in the docs](https://docs.rs/regex/*/#crate-features).
223
224 Note that while this is a new minor version release, the minimum supported
225 Rust version for this crate remains at `1.28.0`.
226
227 New features:
228
229 * [FEATURE #474](https://github.com/rust-lang/regex/issues/474):
230 The `use_std` feature has been deprecated in favor of the `std` feature.
231 The `use_std` feature will be removed in regex 2. Until then, `use_std` will
232 remain as an alias for the `std` feature.
233 * [FEATURE #583](https://github.com/rust-lang/regex/issues/583):
234 Add a substantial number of crate features shrinking `regex`.
235
236
237 1.2.1 (2019-08-03)
238 ==================
239 This release does a bit of house cleaning. Namely:
240
241 * This repository is now using rustfmt.
242 * License headers have been removed from all files, in following suit with the
243 Rust project.
244 * Teddy has been removed from the `regex` crate, and is now part of the
245 `aho-corasick` crate.
246 [See `aho-corasick`'s new `packed` sub-module for details](https://docs.rs/aho-corasick/0.7.6/aho_corasick/packed/index.html).
247 * The `utf8-ranges` crate has been deprecated, with its functionality moving
248 into the
249 [`utf8` sub-module of `regex-syntax`](https://docs.rs/regex-syntax/0.6.11/regex_syntax/utf8/index.html).
250 * The `ucd-util` dependency has been dropped, in favor of implementing what
251 little we need inside of `regex-syntax` itself.
252
253 In general, this is part of an ongoing (long term) effort to make optimizations
254 in the regex engine easier to reason about. The current code is too convoluted
255 and thus it is very easy to introduce new bugs. This simplification effort is
256 the primary motivation behind re-working the `aho-corasick` crate to not only
257 bundle algorithms like Teddy, but to also provide regex-like match semantics
258 automatically.
259
260 Moving forward, the plan is to join up with the `bstr` and `regex-automata`
261 crates, with the former providing more sophisticated substring search
262 algorithms (thereby deleting existing code in `regex`) and the latter providing
263 ahead-of-time compiled DFAs for cases where they are inexpensive to compute.
264
265
266 1.2.0 (2019-07-20)
267 ==================
268 This release updates regex's minimum supported Rust version to 1.28, which was
269 release almost 1 year ago. This release also updates regex's Unicode data
270 tables to 12.1.0.
271
272
273 1.1.9 (2019-07-06)
274 ==================
275 This release contains a bug fix that caused regex's tests to fail, due to a
276 dependency on an unreleased behavior in regex-syntax.
277
278 * [BUG #593](https://github.com/rust-lang/regex/issues/593):
279 Move an integration-style test on error messages into regex-syntax.
280
281
282 1.1.8 (2019-07-04)
283 ==================
284 This release contains a few small internal refactorings. One of which fixes
285 an instance of undefined behavior in a part of the SIMD code.
286
287 Bug fixes:
288
289 * [BUG #545](https://github.com/rust-lang/regex/issues/545):
290 Improves error messages when a repetition operator is used without a number.
291 * [BUG #588](https://github.com/rust-lang/regex/issues/588):
292 Removes use of a repr(Rust) union used for type punning in the Teddy matcher.
293 * [BUG #591](https://github.com/rust-lang/regex/issues/591):
294 Update docs for running benchmarks and improve failure modes.
295
296
297 1.1.7 (2019-06-09)
298 ==================
299 This release fixes up a few warnings as a result of recent deprecations.
300
301
302 1.1.6 (2019-04-16)
303 ==================
304 This release fixes a regression introduced by a bug fix (for
305 [BUG #557](https://github.com/rust-lang/regex/issues/557)) which could cause
306 the regex engine to enter an infinite loop. This bug was originally
307 [reported against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1247).
308
309
310 1.1.5 (2019-04-01)
311 ==================
312 This release fixes a bug in regex's dependency specification where it requires
313 a newer version of regex-syntax, but this wasn't communicated correctly in the
314 Cargo.toml. This would have been caught by a minimal version check, but this
315 check was disabled because the `rand` crate itself advertises incorrect
316 dependency specifications.
317
318 Bug fixes:
319
320 * [BUG #570](https://github.com/rust-lang/regex/pull/570):
321 Fix regex-syntax minimal version.
322
323
324 1.1.4 (2019-03-31)
325 ==================
326 This release fixes a backwards compatibility regression where Regex was no
327 longer UnwindSafe. This was caused by the upgrade to aho-corasick 0.7, whose
328 AhoCorasick type was itself not UnwindSafe. This has been fixed in aho-corasick
329 0.7.4, which we now require.
330
331 Bug fixes:
332
333 * [BUG #568](https://github.com/rust-lang/regex/pull/568):
334 Fix an API regression where Regex was no longer UnwindSafe.
335
336
337 1.1.3 (2019-03-30)
338 ==================
339 This releases fixes a few bugs and adds a performance improvement when a regex
340 is a simple alternation of literals.
341
342 Performance improvements:
343
344 * [OPT #566](https://github.com/rust-lang/regex/pull/566):
345 Upgrades `aho-corasick` to 0.7 and uses it for `foo|bar|...|quux` regexes.
346
347 Bug fixes:
348
349 * [BUG #527](https://github.com/rust-lang/regex/issues/527):
350 Fix a bug where the parser would panic on patterns like `((?x))`.
351 * [BUG #555](https://github.com/rust-lang/regex/issues/555):
352 Fix a bug where the parser would panic on patterns like `(?m){1,1}`.
353 * [BUG #557](https://github.com/rust-lang/regex/issues/557):
354 Fix a bug where captures could lead to an incorrect match.
355
356
357 1.1.2 (2019-02-27)
358 ==================
359 This release fixes a bug found in the fix introduced in 1.1.1.
360
361 Bug fixes:
362
363 * [BUG edf45e6f](https://github.com/rust-lang/regex/commit/edf45e6f):
364 Fix bug introduced in reverse suffix literal matcher in the 1.1.1 release.
365
366
367 1.1.1 (2019-02-27)
368 ==================
369 This is a small release with one fix for a bug caused by literal optimizations.
370
371 Bug fixes:
372
373 * [BUG 661bf53d](https://github.com/rust-lang/regex/commit/661bf53d):
374 Fixes a bug in the reverse suffix literal optimization. This was originally
375 reported
376 [against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1203).
377
378
379 1.1.0 (2018-11-30)
380 ==================
381 This is a small release with a couple small enhancements. This release also
382 increases the minimal supported Rust version (MSRV) to 1.24.1 (from 1.20.0). In
383 accordance with this crate's MSRV policy, this release bumps the minor version
384 number.
385
386 Performance improvements:
387
388 * [OPT #511](https://github.com/rust-lang/regex/pull/511),
389 [OPT #540](https://github.com/rust-lang/regex/pull/540):
390 Improve lazy DFA construction for large regex sets.
391
392 New features:
393
394 * [FEATURE #538](https://github.com/rust-lang/regex/pull/538):
395 Add Emoji and "break" Unicode properties. See [UNICODE.md](UNICODE.md).
396
397 Bug fixes:
398
399 * [BUG #530](https://github.com/rust-lang/regex/pull/530):
400 Add Unicode license (for data tables).
401 * Various typo/doc fixups.
402
403
404 1.0.6 (2018-11-06)
405 ==================
406 This is a small release.
407
408 Performance improvements:
409
410 * [OPT #513](https://github.com/rust-lang/regex/pull/513):
411 Improve performance of compiling large Unicode classes by 8-10%.
412
413 Bug fixes:
414
415 * [BUG #533](https://github.com/rust-lang/regex/issues/533):
416 Fix definition of `[[:blank:]]` class that regressed in `regex-syntax 0.5`.
417
418
419 1.0.5 (2018-09-06)
420 ==================
421 This is a small release with an API enhancement.
422
423 New features:
424
425 * [FEATURE #509](https://github.com/rust-lang/regex/pull/509):
426 Generalize impls of the `Replacer` trait.
427
428
429 1.0.4 (2018-08-25)
430 ==================
431 This is a small release that bumps the quickcheck dependency.
432
433
434 1.0.3 (2018-08-24)
435 ==================
436 This is a small bug fix release.
437
438 Bug fixes:
439
440 * [BUG #504](https://github.com/rust-lang/regex/pull/504):
441 Fix for Cargo's "minimal version" support.
442 * [BUG 1e39165f](https://github.com/rust-lang/regex/commit/1e39165f):
443 Fix doc examples for byte regexes.
444
445
446 1.0.2 (2018-07-18)
447 ==================
448 This release exposes some new lower level APIs on `Regex` that permit
449 amortizing allocation and controlling the location at which a search is
450 performed in a more granular way. Most users of the regex crate will not
451 need or want to use these APIs.
452
453 New features:
454
455 * [FEATURE #493](https://github.com/rust-lang/regex/pull/493):
456 Add a few lower level APIs for amortizing allocation and more fine grained
457 searching.
458
459 Bug fixes:
460
461 * [BUG 3981d2ad](https://github.com/rust-lang/regex/commit/3981d2ad):
462 Correct outdated documentation on `RegexBuilder::dot_matches_new_line`.
463 * [BUG 7ebe4ae0](https://github.com/rust-lang/regex/commit/7ebe4ae0):
464 Correct outdated documentation on `Parser::allow_invalid_utf8` in the
465 `regex-syntax` crate.
466 * [BUG 24c7770b](https://github.com/rust-lang/regex/commit/24c7770b):
467 Fix a bug in the HIR printer where it wouldn't correctly escape meta
468 characters in character classes.
469
470
471 1.0.1 (2018-06-19)
472 ==================
473 This release upgrades regex's Unicode tables to Unicode 11, and enables SIMD
474 optimizations automatically on Rust stable (1.27 or newer).
475
476 New features:
477
478 * [FEATURE #486](https://github.com/rust-lang/regex/pull/486):
479 Implement `size_hint` on `RegexSet` match iterators.
480 * [FEATURE #488](https://github.com/rust-lang/regex/pull/488):
481 Update Unicode tables for Unicode 11.
482 * [FEATURE #490](https://github.com/rust-lang/regex/pull/490):
483 SIMD optimizations are now enabled automatically in Rust stable, for versions
484 1.27 and up. No compilation flags or features need to be set. CPU support
485 SIMD is detected automatically at runtime.
486
487 Bug fixes:
488
489 * [BUG #482](https://github.com/rust-lang/regex/pull/482):
490 Present a better compilation error when the `use_std` feature isn't used.
491
492
493 1.0.0 (2018-05-01)
494 ==================
495 This release marks the 1.0 release of regex.
496
497 While this release includes some breaking changes, most users of older versions
498 of the regex library should be able to migrate to 1.0 by simply bumping the
499 version number. The important changes are as follows:
500
501 * We adopt Rust 1.20 as the new minimum supported version of Rust for regex.
502 We also tentativley adopt a policy that permits bumping the minimum supported
503 version of Rust in minor version releases of regex, but no patch releases.
504 That is, with respect to semver, we do not strictly consider bumping the
505 minimum version of Rust to be a breaking change, but adopt a conservative
506 stance as a compromise.
507 * Octal syntax in regular expressions has been disabled by default. This
508 permits better error messages that inform users that backreferences aren't
509 available. Octal syntax can be re-enabled via the corresponding option on
510 `RegexBuilder`.
511 * `(?-u:\B)` is no longer allowed in Unicode regexes since it can match at
512 invalid UTF-8 code unit boundaries. `(?-u:\b)` is still allowed in Unicode
513 regexes.
514 * The `From<regex_syntax::Error>` impl has been removed. This formally removes
515 the public dependency on `regex-syntax`.
516 * A new feature, `use_std`, has been added and enabled by default. Disabling
517 the feature will result in a compilation error. In the future, this may
518 permit us to support `no_std` environments (w/ `alloc`) in a backwards
519 compatible way.
520
521 For more information and discussion, please see
522 [1.0 release tracking issue](https://github.com/rust-lang/regex/issues/457).
523
524
525 0.2.11 (2018-05-01)
526 ===================
527 This release primarily contains bug fixes. Some of them resolve bugs where
528 the parser could panic.
529
530 New features:
531
532 * [FEATURE #459](https://github.com/rust-lang/regex/pull/459):
533 Include C++'s standard regex library and Boost's regex library in the
534 benchmark harness. We now include D/libphobos, C++/std, C++/boost, Oniguruma,
535 PCRE1, PCRE2, RE2 and Tcl in the harness.
536
537 Bug fixes:
538
539 * [BUG #445](https://github.com/rust-lang/regex/issues/445):
540 Clarify order of indices returned by RegexSet match iterator.
541 * [BUG #461](https://github.com/rust-lang/regex/issues/461):
542 Improve error messages for invalid regexes like `[\d-a]`.
543 * [BUG #464](https://github.com/rust-lang/regex/issues/464):
544 Fix a bug in the error message pretty printer that could cause a panic when
545 a regex contained a literal `\n` character.
546 * [BUG #465](https://github.com/rust-lang/regex/issues/465):
547 Fix a panic in the parser that was caused by applying a repetition operator
548 to `(?flags)`.
549 * [BUG #466](https://github.com/rust-lang/regex/issues/466):
550 Fix a bug where `\pC` was not recognized as an alias for `\p{Other}`.
551 * [BUG #470](https://github.com/rust-lang/regex/pull/470):
552 Fix a bug where literal searches did more work than necessary for anchored
553 regexes.
554
555
556 0.2.10 (2018-03-16)
557 ===================
558 This release primarily updates the regex crate to changes made in `std::arch`
559 on nightly Rust.
560
561 New features:
562
563 * [FEATURE #458](https://github.com/rust-lang/regex/pull/458):
564 The `Hir` type in `regex-syntax` now has a printer.
565
566
567 0.2.9 (2018-03-12)
568 ==================
569 This release introduces a new nightly only feature, `unstable`, which enables
570 SIMD optimizations for certain types of regexes. No additional compile time
571 options are necessary, and the regex crate will automatically choose the
572 best CPU features at run time. As a result, the `simd` (nightly only) crate
573 dependency has been dropped.
574
575 New features:
576
577 * [FEATURE #456](https://github.com/rust-lang/regex/pull/456):
578 The regex crate now includes AVX2 optimizations in addition to the extant
579 SSSE3 optimization.
580
581 Bug fixes:
582
583 * [BUG #455](https://github.com/rust-lang/regex/pull/455):
584 Fix a bug where `(?x)[ / - ]` failed to parse.
585
586
587 0.2.8 (2018-03-12)
588 ==================
589 Bug gixes:
590
591 * [BUG #454](https://github.com/rust-lang/regex/pull/454):
592 Fix a bug in the nest limit checker being too aggressive.
593
594
595 0.2.7 (2018-03-07)
596 ==================
597 This release includes a ground-up rewrite of the regex-syntax crate, which has
598 been in development for over a year.
599
600 New features:
601
602 * Error messages for invalid regexes have been greatly improved. You get these
603 automatically; you don't need to do anything. In addition to better
604 formatting, error messages will now explicitly call out the use of look
605 around. When regex 1.0 is released, this will happen for backreferences as
606 well.
607 * Full support for intersection, difference and symmetric difference of
608 character classes. These can be used via the `&&`, `--` and `~~` binary
609 operators within classes.
610 * A Unicode Level 1 conformat implementation of `\p{..}` character classes.
611 Things like `\p{scx:Hira}`, `\p{age:3.2}` or `\p{Changes_When_Casefolded}`
612 now work. All property name and value aliases are supported, and properties
613 are selected via loose matching. e.g., `\p{Greek}` is the same as
614 `\p{G r E e K}`.
615 * A new `UNICODE.md` document has been added to this repository that
616 exhaustively documents support for UTS#18.
617 * Empty sub-expressions are now permitted in most places. That is, `()+` is
618 now a valid regex.
619 * Almost everything in regex-syntax now uses constant stack space, even when
620 performing anaylsis that requires structural induction. This reduces the risk
621 of a user provided regular expression causing a stack overflow.
622 * [FEATURE #174](https://github.com/rust-lang/regex/issues/174):
623 The `Ast` type in `regex-syntax` now contains span information.
624 * [FEATURE #424](https://github.com/rust-lang/regex/issues/424):
625 Support `\u`, `\u{...}`, `\U` and `\U{...}` syntax for specifying code points
626 in a regular expression.
627 * [FEATURE #449](https://github.com/rust-lang/regex/pull/449):
628 Add a `Replace::by_ref` adapter for use of a replacer without consuming it.
629
630 Bug fixes:
631
632 * [BUG #446](https://github.com/rust-lang/regex/issues/446):
633 We re-enable the Boyer-Moore literal matcher.
634
635
636 0.2.6 (2018-02-08)
637 ==================
638 Bug fixes:
639
640 * [BUG #446](https://github.com/rust-lang/regex/issues/446):
641 Fixes a bug in the new Boyer-Moore searcher that results in a match failure.
642 We fix this bug by temporarily disabling Boyer-Moore.
643
644
645 0.2.5 (2017-12-30)
646 ==================
647 Bug fixes:
648
649 * [BUG #437](https://github.com/rust-lang/regex/issues/437):
650 Fixes a bug in the new Boyer-Moore searcher that results in a panic.
651
652
653 0.2.4 (2017-12-30)
654 ==================
655 New features:
656
657 * [FEATURE #348](https://github.com/rust-lang/regex/pull/348):
658 Improve performance for capture searches on anchored regex.
659 (Contributed by @ethanpailes. Nice work!)
660 * [FEATURE #419](https://github.com/rust-lang/regex/pull/419):
661 Expand literal searching to include Tuned Boyer-Moore in some cases.
662 (Contributed by @ethanpailes. Nice work!)
663
664 Bug fixes:
665
666 * [BUG](https://github.com/rust-lang/regex/pull/436):
667 The regex compiler plugin has been removed.
668 * [BUG](https://github.com/rust-lang/regex/pull/436):
669 `simd` has been bumped to `0.2.1`, which fixes a Rust nightly build error.
670 * [BUG](https://github.com/rust-lang/regex/pull/436):
671 Bring the benchmark harness up to date.
672
673
674 0.2.3 (2017-11-30)
675 ==================
676 New features:
677
678 * [FEATURE #374](https://github.com/rust-lang/regex/pull/374):
679 Add `impl From<Match> for &str`.
680 * [FEATURE #380](https://github.com/rust-lang/regex/pull/380):
681 Derive `Clone` and `PartialEq` on `Error`.
682 * [FEATURE #400](https://github.com/rust-lang/regex/pull/400):
683 Update to Unicode 10.
684
685 Bug fixes:
686
687 * [BUG #375](https://github.com/rust-lang/regex/issues/375):
688 Fix a bug that prevented the bounded backtracker from terminating.
689 * [BUG #393](https://github.com/rust-lang/regex/issues/393),
690 [BUG #394](https://github.com/rust-lang/regex/issues/394):
691 Fix bug with `replace` methods for empty matches.
692
693
694 0.2.2 (2017-05-21)
695 ==================
696 New features:
697
698 * [FEATURE #341](https://github.com/rust-lang/regex/issues/341):
699 Support nested character classes and intersection operation.
700 For example, `[\p{Greek}&&\pL]` matches greek letters and
701 `[[0-9]&&[^4]]` matches every decimal digit except `4`.
702 (Much thanks to @robinst, who contributed this awesome feature.)
703
704 Bug fixes:
705
706 * [BUG #321](https://github.com/rust-lang/regex/issues/321):
707 Fix bug in literal extraction and UTF-8 decoding.
708 * [BUG #326](https://github.com/rust-lang/regex/issues/326):
709 Add documentation tip about the `(?x)` flag.
710 * [BUG #333](https://github.com/rust-lang/regex/issues/333):
711 Show additional replacement example using curly braces.
712 * [BUG #334](https://github.com/rust-lang/regex/issues/334):
713 Fix bug when resolving captures after a match.
714 * [BUG #338](https://github.com/rust-lang/regex/issues/338):
715 Add example that uses `Captures::get` to API documentation.
716 * [BUG #353](https://github.com/rust-lang/regex/issues/353):
717 Fix RegexSet bug that caused match failure in some cases.
718 * [BUG #354](https://github.com/rust-lang/regex/pull/354):
719 Fix panic in parser when `(?x)` is used.
720 * [BUG #358](https://github.com/rust-lang/regex/issues/358):
721 Fix literal optimization bug with RegexSet.
722 * [BUG #359](https://github.com/rust-lang/regex/issues/359):
723 Fix example code in README.
724 * [BUG #365](https://github.com/rust-lang/regex/pull/365):
725 Fix bug in `rure_captures_len` in the C binding.
726 * [BUG #367](https://github.com/rust-lang/regex/issues/367):
727 Fix byte class bug that caused a panic.
728
729
730 0.2.1
731 =====
732 One major bug with `replace_all` has been fixed along with a couple of other
733 touchups.
734
735 * [BUG #312](https://github.com/rust-lang/regex/issues/312):
736 Fix documentation for `NoExpand` to reference correct lifetime parameter.
737 * [BUG #314](https://github.com/rust-lang/regex/issues/314):
738 Fix a bug with `replace_all` when replacing a match with the empty string.
739 * [BUG #316](https://github.com/rust-lang/regex/issues/316):
740 Note a missing breaking change from the `0.2.0` CHANGELOG entry.
741 (`RegexBuilder::compile` was renamed to `RegexBuilder::build`.)
742 * [BUG #324](https://github.com/rust-lang/regex/issues/324):
743 Compiling `regex` should only require one version of `memchr` crate.
744
745
746 0.2.0
747 =====
748 This is a new major release of the regex crate, and is an implementation of the
749 [regex 1.0 RFC](https://github.com/rust-lang/rfcs/blob/master/text/1620-regex-1.0.md).
750 We are releasing a `0.2` first, and if there are no major problems, we will
751 release a `1.0` shortly. For `0.2`, the minimum *supported* Rust version is
752 1.12.
753
754 There are a number of **breaking changes** in `0.2`. They are split into two
755 types. The first type correspond to breaking changes in regular expression
756 syntax. The second type correspond to breaking changes in the API.
757
758 Breaking changes for regex syntax:
759
760 * POSIX character classes now require double bracketing. Previously, the regex
761 `[:upper:]` would parse as the `upper` POSIX character class. Now it parses
762 as the character class containing the characters `:upper:`. The fix to this
763 change is to use `[[:upper:]]` instead. Note that variants like
764 `[[:upper:][:blank:]]` continue to work.
765 * The character `[` must always be escaped inside a character class.
766 * The characters `&`, `-` and `~` must be escaped if any one of them are
767 repeated consecutively. For example, `[&]`, `[\&]`, `[\&\&]`, `[&-&]` are all
768 equivalent while `[&&]` is illegal. (The motivation for this and the prior
769 change is to provide a backwards compatible path for adding character class
770 set notation.)
771 * A `bytes::Regex` now has Unicode mode enabled by default (like the main
772 `Regex` type). This means regexes compiled with `bytes::Regex::new` that
773 don't have the Unicode flag set should add `(?-u)` to recover the original
774 behavior.
775
776 Breaking changes for the regex API:
777
778 * `find` and `find_iter` now **return `Match` values instead of
779 `(usize, usize)`.** `Match` values have `start` and `end` methods, which
780 return the match offsets. `Match` values also have an `as_str` method,
781 which returns the text of the match itself.
782 * The `Captures` type now only provides a single iterator over all capturing
783 matches, which should replace uses of `iter` and `iter_pos`. Uses of
784 `iter_named` should use the `capture_names` method on `Regex`.
785 * The `at` method on the `Captures` type has been renamed to `get`, and it
786 now returns a `Match`. Similarly, the `name` method on `Captures` now returns
787 a `Match`.
788 * The `replace` methods now return `Cow` values. The `Cow::Borrowed` variant
789 is returned when no replacements are made.
790 * The `Replacer` trait has been completely overhauled. This should only
791 impact clients that implement this trait explicitly. Standard uses of
792 the `replace` methods should continue to work unchanged. If you implement
793 the `Replacer` trait, please consult the new documentation.
794 * The `quote` free function has been renamed to `escape`.
795 * The `Regex::with_size_limit` method has been removed. It is replaced by
796 `RegexBuilder::size_limit`.
797 * The `RegexBuilder` type has switched from owned `self` method receivers to
798 `&mut self` method receivers. Most uses will continue to work unchanged, but
799 some code may require naming an intermediate variable to hold the builder.
800 * The `compile` method on `RegexBuilder` has been renamed to `build`.
801 * The free `is_match` function has been removed. It is replaced by compiling
802 a `Regex` and calling its `is_match` method.
803 * The `PartialEq` and `Eq` impls on `Regex` have been dropped. If you relied
804 on these impls, the fix is to define a wrapper type around `Regex`, impl
805 `Deref` on it and provide the necessary impls.
806 * The `is_empty` method on `Captures` has been removed. This always returns
807 `false`, so its use is superfluous.
808 * The `Syntax` variant of the `Error` type now contains a string instead of
809 a `regex_syntax::Error`. If you were examining syntax errors more closely,
810 you'll need to explicitly use the `regex_syntax` crate to re-parse the regex.
811 * The `InvalidSet` variant of the `Error` type has been removed since it is
812 no longer used.
813 * Most of the iterator types have been renamed to match conventions. If you
814 were using these iterator types explicitly, please consult the documentation
815 for its new name. For example, `RegexSplits` has been renamed to `Split`.
816
817 A number of bugs have been fixed:
818
819 * [BUG #151](https://github.com/rust-lang/regex/issues/151):
820 The `Replacer` trait has been changed to permit the caller to control
821 allocation.
822 * [BUG #165](https://github.com/rust-lang/regex/issues/165):
823 Remove the free `is_match` function.
824 * [BUG #166](https://github.com/rust-lang/regex/issues/166):
825 Expose more knobs (available in `0.1`) and remove `with_size_limit`.
826 * [BUG #168](https://github.com/rust-lang/regex/issues/168):
827 Iterators produced by `Captures` now have the correct lifetime parameters.
828 * [BUG #175](https://github.com/rust-lang/regex/issues/175):
829 Fix a corner case in the parsing of POSIX character classes.
830 * [BUG #178](https://github.com/rust-lang/regex/issues/178):
831 Drop the `PartialEq` and `Eq` impls on `Regex`.
832 * [BUG #179](https://github.com/rust-lang/regex/issues/179):
833 Remove `is_empty` from `Captures` since it always returns false.
834 * [BUG #276](https://github.com/rust-lang/regex/issues/276):
835 Position of named capture can now be retrieved from a `Captures`.
836 * [BUG #296](https://github.com/rust-lang/regex/issues/296):
837 Remove winapi/kernel32-sys dependency on UNIX.
838 * [BUG #307](https://github.com/rust-lang/regex/issues/307):
839 Fix error on emscripten.
840
841
842 0.1.80
843 ======
844 * [PR #292](https://github.com/rust-lang/regex/pull/292):
845 Fixes bug #291, which was introduced by PR #290.
846
847 0.1.79
848 ======
849 * Require regex-syntax 0.3.8.
850
851 0.1.78
852 ======
853 * [PR #290](https://github.com/rust-lang/regex/pull/290):
854 Fixes bug #289, which caused some regexes with a certain combination
855 of literals to match incorrectly.
856
857 0.1.77
858 ======
859 * [PR #281](https://github.com/rust-lang/regex/pull/281):
860 Fixes bug #280 by disabling all literal optimizations when a pattern
861 is partially anchored.
862
863 0.1.76
864 ======
865 * Tweak criteria for using the Teddy literal matcher.
866
867 0.1.75
868 ======
869 * [PR #275](https://github.com/rust-lang/regex/pull/275):
870 Improves match verification performance in the Teddy SIMD searcher.
871 * [PR #278](https://github.com/rust-lang/regex/pull/278):
872 Replaces slow substring loop in the Teddy SIMD searcher with Aho-Corasick.
873 * Implemented DoubleEndedIterator on regex set match iterators.
874
875 0.1.74
876 ======
877 * Release regex-syntax 0.3.5 with a minor bug fix.
878 * Fix bug #272.
879 * Fix bug #277.
880 * [PR #270](https://github.com/rust-lang/regex/pull/270):
881 Fixes bugs #264, #268 and an unreported where the DFA cache size could be
882 drastically under estimated in some cases (leading to high unexpected memory
883 usage).
884
885 0.1.73
886 ======
887 * Release `regex-syntax 0.3.4`.
888 * Bump `regex-syntax` dependency version for `regex` to `0.3.4`.
889
890 0.1.72
891 ======
892 * [PR #262](https://github.com/rust-lang/regex/pull/262):
893 Fixes a number of small bugs caught by fuzz testing (AFL).
894
895 0.1.71
896 ======
897 * [PR #236](https://github.com/rust-lang/regex/pull/236):
898 Fix a bug in how suffix literals were extracted, which could lead
899 to invalid match behavior in some cases.
900
901 0.1.70
902 ======
903 * [PR #231](https://github.com/rust-lang/regex/pull/231):
904 Add SIMD accelerated multiple pattern search.
905 * [PR #228](https://github.com/rust-lang/regex/pull/228):
906 Reintroduce the reverse suffix literal optimization.
907 * [PR #226](https://github.com/rust-lang/regex/pull/226):
908 Implements NFA state compression in the lazy DFA.
909 * [PR #223](https://github.com/rust-lang/regex/pull/223):
910 A fully anchored RegexSet can now short-circuit.
911
912 0.1.69
913 ======
914 * [PR #216](https://github.com/rust-lang/regex/pull/216):
915 Tweak the threshold for running backtracking.
916 * [PR #217](https://github.com/rust-lang/regex/pull/217):
917 Add upper limit (from the DFA) to capture search (for the NFA).
918 * [PR #218](https://github.com/rust-lang/regex/pull/218):
919 Add rure, a C API.
920
921 0.1.68
922 ======
923 * [PR #210](https://github.com/rust-lang/regex/pull/210):
924 Fixed a performance bug in `bytes::Regex::replace` where `extend` was used
925 instead of `extend_from_slice`.
926 * [PR #211](https://github.com/rust-lang/regex/pull/211):
927 Fixed a bug in the handling of word boundaries in the DFA.
928 * [PR #213](https://github.com/rust-lang/pull/213):
929 Added RE2 and Tcl to the benchmark harness. Also added a CLI utility from
930 running regexes using any of the following regex engines: PCRE1, PCRE2,
931 Oniguruma, RE2, Tcl and of course Rust's own regexes.
932
933 0.1.67
934 ======
935 * [PR #201](https://github.com/rust-lang/regex/pull/201):
936 Fix undefined behavior in the `regex!` compiler plugin macro.
937 * [PR #205](https://github.com/rust-lang/regex/pull/205):
938 More improvements to DFA performance. Competitive with RE2. See PR for
939 benchmarks.
940 * [PR #209](https://github.com/rust-lang/regex/pull/209):
941 Release 0.1.66 was semver incompatible since it required a newer version
942 of Rust than previous releases. This PR fixes that. (And `0.1.66` was
943 yanked.)
944
945 0.1.66
946 ======
947 * Speculative support for Unicode word boundaries was added to the DFA. This
948 should remove the last common case that disqualified use of the DFA.
949 * An optimization that scanned for suffix literals and then matched the regular
950 expression in reverse was removed because it had worst case quadratic time
951 complexity. It was replaced with a more limited optimization where, given any
952 regex of the form `re$`, it will be matched in reverse from the end of the
953 haystack.
954 * [PR #202](https://github.com/rust-lang/regex/pull/202):
955 The inner loop of the DFA was heavily optimized to improve cache locality
956 and reduce the overall number of instructions run on each iteration. This
957 represents the first use of `unsafe` in `regex` (to elide bounds checks).
958 * [PR #200](https://github.com/rust-lang/regex/pull/200):
959 Use of the `mempool` crate (which used thread local storage) was replaced
960 with a faster version of a similar API in @Amanieu's `thread_local` crate.
961 It should reduce contention when using a regex from multiple threads
962 simultaneously.
963 * PCRE2 JIT benchmarks were added. A benchmark comparison can be found
964 [here](https://gist.github.com/anonymous/14683c01993e91689f7206a18675901b).
965 (Includes a comparison with PCRE1's JIT and Oniguruma.)
966 * A bug where word boundaries weren't being matched correctly in the DFA was
967 fixed. This only affected use of `bytes::Regex`.
968 * [#160](https://github.com/rust-lang/regex/issues/160):
969 `Captures` now has a `Debug` impl.