blob: bd0df866e6e6ec86bad5a05e3c4a46eb18696d0b [file] [log] [blame]
Janis Danisevskis53e448c2016-03-31 13:35:25 +01001News about PCRE2 releases
2-------------------------
3
Elliott Hughes653c2102019-01-09 15:41:36 -08004
Elliott Hughes0c26e192019-08-07 12:24:46 -07005Version 10.33-RC1 16-April-2019
6-------------------------------
7
8Yet more bugfixes, tidies, and a few enhancements, summarized here (see
9ChangeLog for the full list):
10
111. Callouts from pcre2_substitute() are now available.
12
132. The POSIX functions are now all called pcre2_regcomp() etc., with wrapper
14functions that use the standard POSIX names. However, in pcre2posix.h the POSIX
15names are defined as macros. This should help avoid linking with the wrong
16library in some environments, while still exporting the POSIX names for
17pre-existing programs that use them.
18
193. Some new options:
20
21 (a) PCRE2_EXTRA_ESCAPED_CR_IS_LF makes \r behave as \n.
22
23 (b) PCRE2_EXTRA_ALT_BSUX enables support for ECMAScript 6's \u{hh...}
24 construct.
25
26 (c) PCRE2_COPY_MATCHED_SUBJECT causes a copy of a matched subject to be
27 made, instead of just remembering a pointer.
28
294. Some new Perl features:
30
31 (a) Perl 5.28's experimental alphabetic names for atomic groups and
32 lookaround assertions, for example, (*pla:...) and (*atomic:...).
33
34 (b) The new Perl "script run" features (*script_run:...) and
35 (*atomic_script_run:...) aka (*sr:...) and (*asr:...).
36
37 (c) When PCRE2_UTF is set, allow non-ASCII letters and decimal digits in
38 capture group names.
39
405. --disable-percent-zt disables the use of %zu and %td in formatting strings
41in pcre2test. They were already automatically disabled for VC and older C
42compilers.
43
446. Some changes related to callouts in pcre2grep:
45
46 (a) Support for running an external program under VMS has been added, in
47 addition to Windows and fork() support.
48
49 (b) --disable-pcre2grep-callout-fork restricts the callout support in
50 to the inbuilt echo facility.
51
52
Elliott Hughes653c2102019-01-09 15:41:36 -080053Version 10.32 10-September-2018
54-------------------------------
55
56This is another mainly bugfix and tidying release with a few minor
57enhancements. These are the main ones:
58
591. pcre2grep now supports the inclusion of binary zeros in patterns that are
60read from files via the -f option.
61
622. ./configure now supports --enable-jit=auto, which automatically enables JIT
63if the hardware supports it.
64
653. In pcre2_dfa_match(), internal recursive calls no longer use the stack for
66local workspace and local ovectors. Instead, an initial block of stack is
67reserved, but if this is insufficient, heap memory is used. The heap limit
68parameter now applies to pcre2_dfa_match().
69
704. Updated to Unicode version 11.0.0.
71
725. (*ACCEPT:ARG), (*FAIL:ARG), and (*COMMIT:ARG) are now supported.
73
746. Added support for \N{U+dddd}, but only in Unicode mode.
75
767. Added support for (?^) to unset all imnsx options.
77
78
Elliott Hughes9bc971b2018-07-27 13:23:14 -070079Version 10.31 12-February-2018
80------------------------------
81
82This is mainly a bugfix and tidying release (see ChangeLog for full details).
83However, there are some minor enhancements.
84
851. New pcre2_config() options: PCRE2_CONFIG_NEVER_BACKSLASH_C and
86PCRE2_CONFIG_COMPILED_WIDTHS.
87
882. New pcre2_pattern_info() option PCRE2_INFO_EXTRAOPTIONS to retrieve the
89extra compile time options.
90
913. There are now public names for all the pcre2_compile() error numbers.
92
934. Added PCRE2_CALLOUT_STARTMATCH and PCRE2_CALLOUT_BACKTRACK bits to a new
94field callout_flags in callout blocks.
95
96
97Version 10.30 14-August-2017
98----------------------------
99
100The full list of changes that includes bugfixes and tidies is, as always, in
101ChangeLog. These are the most important new features:
102
1031. The main interpreter, pcre2_match(), has been refactored into a new version
104that does not use recursive function calls (and therefore the system stack) for
105remembering backtracking positions. This makes --disable-stack-for-recursion a
106NOOP. The new implementation allows backtracking into recursive group calls in
107patterns, making it more compatible with Perl, and also fixes some other
108previously hard-to-do issues. For patterns that have a lot of backtracking, the
Elliott Hughes653c2102019-01-09 15:41:36 -0800109heap is now used, and there is an explicit limit on the amount, settable by
Elliott Hughes9bc971b2018-07-27 13:23:14 -0700110pcre2_set_heap_limit() or (*LIMIT_HEAP=xxx). The "recursion limit" is retained,
111but is renamed as "depth limit" (though the old names remain for
112compatibility).
113
114There is also a change in the way callouts from pcre2_match() are handled. The
115offset_vector field in the callout block is no longer a pointer to the
116actual ovector that was passed to the matching function in the match data
117block. Instead it points to an internal ovector of a size large enough to hold
118all possible captured substrings in the pattern.
119
1202. The new option PCRE2_ENDANCHORED insists that a pattern match must end at
121the end of the subject.
122
1233. The new option PCRE2_EXTENDED_MORE implements Perl's /xx feature, and
124pcre2test is upgraded to support it. Setting within the pattern by (?xx) is
125also supported.
126
1274. (?n) can be used to set PCRE2_NO_AUTO_CAPTURE, because Perl now has this.
128
1295. Additional compile options in the compile context are now available, and the
130first two are: PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES and
Elliott Hughes653c2102019-01-09 15:41:36 -0800131PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL.
Elliott Hughes9bc971b2018-07-27 13:23:14 -0700132
1336. The newline type PCRE2_NEWLINE_NUL is now available.
134
1357. The match limit value now also applies to pcre2_dfa_match() as there are
136patterns that can use up a lot of resources without necessarily recursing very
137deeply.
138
1398. The option REG_PEND (a GNU extension) is now available for the POSIX
140wrapper. Also there is a new option PCRE2_LITERAL which is used to support
141REG_NOSPEC.
142
1439. PCRE2_EXTRA_MATCH_LINE and PCRE2_EXTRA_MATCH_WORD are implemented for the
144benefit of pcre2grep, and pcre2grep's -F, -w, and -x options are re-implemented
145using PCRE2_LITERAL, PCRE2_EXTRA_MATCH_WORD, and PCRE2_EXTRA_MATCH_LINE. This
146is tidier and also fixes some bugs.
147
14810. The Unicode tables are upgraded from Unicode 8.0.0 to Unicode 10.0.0.
149
15011. There are some experimental functions for converting foreign patterns
151(globs and POSIX patterns) into PCRE2 patterns.
152
153
154Version 10.23 14-February-2017
155------------------------------
156
1571. ChangeLog has the details of a lot of bug fixes and tidies.
158
1592. There has been a major re-factoring of the pcre2_compile.c file. Most syntax
160checking is now done in the pre-pass that identifies capturing groups. This has
161reduced the amount of duplication and made the code tidier. While doing this,
162some minor bugs and Perl incompatibilities were fixed (see ChangeLog for
163details.)
164
1653. Back references are now permitted in lookbehind assertions when there are
166no duplicated group numbers (that is, (?| has not been used), and, if the
167reference is by name, there is only one group of that name. The referenced
168group must, of course be of fixed length.
169
1704. \g{+<number>} (e.g. \g{+2} ) is now supported. It is a "forward back
171reference" and can be useful in repetitions (compare \g{-<number>} ). Perl does
172not recognize this syntax.
173
1745. pcre2grep now automatically expands its buffer up to a maximum set by
175--max-buffer-size.
176
1776. The -t option (grand total) has been added to pcre2grep.
178
1797. A new function called pcre2_code_copy_with_tables() exists to copy a
180compiled pattern along with a private copy of the character tables that is
181uses.
182
1838. A user supplied a number of patches to upgrade pcre2grep under Windows and
184tidy the code.
185
1869. Several updates have been made to pcre2test and test scripts (see
187ChangeLog).
188
189
Janis Danisevskis8b979b22016-08-15 16:09:16 +0100190Version 10.22 29-July-2016
191--------------------------
192
1931. ChangeLog has the details of a number of bug fixes.
194
1952. The POSIX wrapper function regcomp() did not used to support back references
196and subroutine calls if called with the REG_NOSUB option. It now does.
197
1983. A new function, pcre2_code_copy(), is added, to make a copy of a compiled
199pattern.
200
2014. Support for string callouts is added to pcre2grep.
202
2035. Added the PCRE2_NO_JIT option to pcre2_match().
204
2056. The pcre2_get_error_message() function now returns with a negative error
206code if the error number it is given is unknown.
207
2087. Several updates have been made to pcre2test and test scripts (see
209ChangeLog).
210
211
Janis Danisevskis53e448c2016-03-31 13:35:25 +0100212Version 10.21 12-January-2016
213-----------------------------
214
2151. Many bugs have been fixed. A large number of them were provoked only by very
216strange pattern input, and were discovered by fuzzers. Some others were
217discovered by code auditing. See ChangeLog for details.
218
2192. The Unicode tables have been updated to Unicode version 8.0.0.
220
2213. For Perl compatibility in EBCDIC environments, ranges such as a-z in a
222class, where both values are literal letters in the same case, omit the
223non-letter EBCDIC code points within the range.
224
2254. There have been a number of enhancements to the pcre2_substitute() function,
226giving more flexibility to replacement facilities. It is now also possible to
227cause the function to return the needed buffer size if the one given is too
228small.
229
2305. The PCRE2_ALT_VERBNAMES option causes the "name" parts of special verbs such
231as (*THEN:name) to be processed for backslashes and to take note of
232PCRE2_EXTENDED.
233
2346. PCRE2_INFO_HASBACKSLASHC makes it possible for a client to find out if a
235pattern uses \C, and --never-backslash-C makes it possible to compile a version
236PCRE2 in which the use of \C is always forbidden.
237
2387. A limit to the length of pattern that can be handled can now be set by
239calling pcre2_set_max_pattern_length().
240
2418. When matching an unanchored pattern, a match can be required to begin within
242a given number of code units after the start of the subject by calling
243pcre2_set_offset_limit().
244
2459. The pcre2test program has been extended to test new facilities, and it can
246now run the tests when LF on its own is not a valid newline sequence.
247
24810. The RunTest script has also been updated to enable more tests to be run.
249
25011. There have been some minor performance enhancements.
251
252
253Version 10.20 30-June-2015
254--------------------------
255
2561. Callouts with string arguments and the pcre2_callout_enumerate() function
257have been implemented.
258
2592. The PCRE2_NEVER_BACKSLASH_C option, which locks out the use of \C, is added.
260
2613. The PCRE2_ALT_CIRCUMFLEX option lets ^ match after a newline at the end of a
262subject in multiline mode.
263
2644. The way named subpatterns are handled has been refactored. The previous
265approach had several bugs.
266
2675. The handling of \c in EBCDIC environments has been changed to conform to the
268perlebcdic document. This is an incompatible change.
269
2706. Bugs have been mended, many of them discovered by fuzzers.
271
272
273Version 10.10 06-March-2015
274---------------------------
275
2761. Serialization and de-serialization functions have been added to the API,
277making it possible to save and restore sets of compiled patterns, though
278restoration must be done in the same environment that was used for compilation.
279
2802. The (*NO_JIT) feature has been added; this makes it possible for a pattern
281creator to specify that JIT is not to be used.
282
2833. A number of bugs have been fixed. In particular, bugs that caused building
284on Windows using CMake to fail have been mended.
285
286
287Version 10.00 05-January-2015
288-----------------------------
289
290Version 10.00 is the first release of PCRE2, a revised API for the PCRE
291library. Changes prior to 10.00 are logged in the ChangeLog file for the old
292API, up to item 20 for release 8.36. New programs are recommended to use the
293new library. Programs that use the original (PCRE1) API will need changing
294before linking with the new library.
295
296****