blob: 8e3cf7eab9bb277ab01aff8268c2397e76ee0032 [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 Hughes378b1752021-06-08 13:42:40 -07005Version 10.37 26-May-2021
6-------------------------
7
8A few more bug fixes and tidies. The only change of real note is the removal of
9the actual POSIX names regcomp etc. from the POSIX wrapper library because
10these have caused issues for some applications (see 10.33 #2 below).
11
12
Elliott Hughes3435c422020-12-04 13:18:28 -080013Version 10.36 04-December-2020
14------------------------------
15
16Again, mainly bug fixes and tidies. The only enhancements are the addition of
17GNU grep's -m (aka --max-count) option to pcre2grep, and also unifying the
18handling of substitution strings for both -O and callouts in pcre2grep, with
19the addition of $x{...} and $o{...} to allow for characters whose code points
20are greater than 255 in Unicode mode.
21
22NOTE: there is an outstanding issue with JIT support for MacOS on arm64
23hardware. For details, please see Bugzilla issue #2618.
24
25
Elliott Hughes2dbd7d22020-06-03 14:32:37 -070026Version 10.35 15-April-2020
27---------------------------
28
29Bugfixes, tidies, and a few new enhancements.
30
311. Capturing groups that contain recursive backreferences to themselves are no
32longer automatically atomic, because the restriction is no longer necessary
33as a result of the 10.30 restructuring.
34
352. Several new options for pcre2_substitute().
36
373. When Unicode is supported and PCRE2_UCP is set without PCRE2_UTF, Unicode
38character properties are used for upper/lower case computations on characters
39whose code points are greater than 127.
40
414. The character tables (for low-valued characters) can now more easily be
42saved and restored in binary.
43
445. Updated to Unicode 13.0.0.
45
46
47Version 10.34 21-November-2019
48------------------------------
49
50Another release with a few enhancements as well as bugfixes and tidies. The
51main new features are:
52
531. There is now some support for matching in invalid UTF strings.
54
552. Non-atomic positive lookarounds are implemented in the pcre2_match()
56interpreter, but not in JIT.
57
583. Added two new functions: pcre2_get_match_data_size() and
59pcre2_maketables_free().
60
614. Upgraded to Unicode 12.1.0.
62
63
64Version 10.33 16-April-2019
65---------------------------
Elliott Hughes0c26e192019-08-07 12:24:46 -070066
67Yet more bugfixes, tidies, and a few enhancements, summarized here (see
68ChangeLog for the full list):
69
701. Callouts from pcre2_substitute() are now available.
71
722. The POSIX functions are now all called pcre2_regcomp() etc., with wrapper
73functions that use the standard POSIX names. However, in pcre2posix.h the POSIX
74names are defined as macros. This should help avoid linking with the wrong
75library in some environments, while still exporting the POSIX names for
76pre-existing programs that use them.
77
783. Some new options:
79
80 (a) PCRE2_EXTRA_ESCAPED_CR_IS_LF makes \r behave as \n.
81
82 (b) PCRE2_EXTRA_ALT_BSUX enables support for ECMAScript 6's \u{hh...}
83 construct.
84
85 (c) PCRE2_COPY_MATCHED_SUBJECT causes a copy of a matched subject to be
86 made, instead of just remembering a pointer.
87
884. Some new Perl features:
89
90 (a) Perl 5.28's experimental alphabetic names for atomic groups and
91 lookaround assertions, for example, (*pla:...) and (*atomic:...).
92
93 (b) The new Perl "script run" features (*script_run:...) and
94 (*atomic_script_run:...) aka (*sr:...) and (*asr:...).
95
96 (c) When PCRE2_UTF is set, allow non-ASCII letters and decimal digits in
97 capture group names.
98
995. --disable-percent-zt disables the use of %zu and %td in formatting strings
100in pcre2test. They were already automatically disabled for VC and older C
101compilers.
102
1036. Some changes related to callouts in pcre2grep:
104
105 (a) Support for running an external program under VMS has been added, in
106 addition to Windows and fork() support.
107
108 (b) --disable-pcre2grep-callout-fork restricts the callout support in
109 to the inbuilt echo facility.
110
111
Elliott Hughes653c2102019-01-09 15:41:36 -0800112Version 10.32 10-September-2018
113-------------------------------
114
115This is another mainly bugfix and tidying release with a few minor
116enhancements. These are the main ones:
117
1181. pcre2grep now supports the inclusion of binary zeros in patterns that are
119read from files via the -f option.
120
1212. ./configure now supports --enable-jit=auto, which automatically enables JIT
122if the hardware supports it.
123
1243. In pcre2_dfa_match(), internal recursive calls no longer use the stack for
125local workspace and local ovectors. Instead, an initial block of stack is
126reserved, but if this is insufficient, heap memory is used. The heap limit
127parameter now applies to pcre2_dfa_match().
128
1294. Updated to Unicode version 11.0.0.
130
1315. (*ACCEPT:ARG), (*FAIL:ARG), and (*COMMIT:ARG) are now supported.
132
1336. Added support for \N{U+dddd}, but only in Unicode mode.
134
1357. Added support for (?^) to unset all imnsx options.
136
137
Elliott Hughes9bc971b2018-07-27 13:23:14 -0700138Version 10.31 12-February-2018
139------------------------------
140
141This is mainly a bugfix and tidying release (see ChangeLog for full details).
142However, there are some minor enhancements.
143
1441. New pcre2_config() options: PCRE2_CONFIG_NEVER_BACKSLASH_C and
145PCRE2_CONFIG_COMPILED_WIDTHS.
146
1472. New pcre2_pattern_info() option PCRE2_INFO_EXTRAOPTIONS to retrieve the
148extra compile time options.
149
1503. There are now public names for all the pcre2_compile() error numbers.
151
1524. Added PCRE2_CALLOUT_STARTMATCH and PCRE2_CALLOUT_BACKTRACK bits to a new
153field callout_flags in callout blocks.
154
155
156Version 10.30 14-August-2017
157----------------------------
158
159The full list of changes that includes bugfixes and tidies is, as always, in
160ChangeLog. These are the most important new features:
161
1621. The main interpreter, pcre2_match(), has been refactored into a new version
163that does not use recursive function calls (and therefore the system stack) for
164remembering backtracking positions. This makes --disable-stack-for-recursion a
165NOOP. The new implementation allows backtracking into recursive group calls in
166patterns, making it more compatible with Perl, and also fixes some other
167previously hard-to-do issues. For patterns that have a lot of backtracking, the
Elliott Hughes653c2102019-01-09 15:41:36 -0800168heap is now used, and there is an explicit limit on the amount, settable by
Elliott Hughes9bc971b2018-07-27 13:23:14 -0700169pcre2_set_heap_limit() or (*LIMIT_HEAP=xxx). The "recursion limit" is retained,
170but is renamed as "depth limit" (though the old names remain for
171compatibility).
172
173There is also a change in the way callouts from pcre2_match() are handled. The
174offset_vector field in the callout block is no longer a pointer to the
175actual ovector that was passed to the matching function in the match data
176block. Instead it points to an internal ovector of a size large enough to hold
177all possible captured substrings in the pattern.
178
1792. The new option PCRE2_ENDANCHORED insists that a pattern match must end at
180the end of the subject.
181
1823. The new option PCRE2_EXTENDED_MORE implements Perl's /xx feature, and
183pcre2test is upgraded to support it. Setting within the pattern by (?xx) is
184also supported.
185
1864. (?n) can be used to set PCRE2_NO_AUTO_CAPTURE, because Perl now has this.
187
1885. Additional compile options in the compile context are now available, and the
189first two are: PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES and
Elliott Hughes653c2102019-01-09 15:41:36 -0800190PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL.
Elliott Hughes9bc971b2018-07-27 13:23:14 -0700191
1926. The newline type PCRE2_NEWLINE_NUL is now available.
193
1947. The match limit value now also applies to pcre2_dfa_match() as there are
195patterns that can use up a lot of resources without necessarily recursing very
196deeply.
197
1988. The option REG_PEND (a GNU extension) is now available for the POSIX
199wrapper. Also there is a new option PCRE2_LITERAL which is used to support
200REG_NOSPEC.
201
2029. PCRE2_EXTRA_MATCH_LINE and PCRE2_EXTRA_MATCH_WORD are implemented for the
203benefit of pcre2grep, and pcre2grep's -F, -w, and -x options are re-implemented
204using PCRE2_LITERAL, PCRE2_EXTRA_MATCH_WORD, and PCRE2_EXTRA_MATCH_LINE. This
205is tidier and also fixes some bugs.
206
20710. The Unicode tables are upgraded from Unicode 8.0.0 to Unicode 10.0.0.
208
20911. There are some experimental functions for converting foreign patterns
210(globs and POSIX patterns) into PCRE2 patterns.
211
212
213Version 10.23 14-February-2017
214------------------------------
215
2161. ChangeLog has the details of a lot of bug fixes and tidies.
217
2182. There has been a major re-factoring of the pcre2_compile.c file. Most syntax
219checking is now done in the pre-pass that identifies capturing groups. This has
220reduced the amount of duplication and made the code tidier. While doing this,
221some minor bugs and Perl incompatibilities were fixed (see ChangeLog for
222details.)
223
2243. Back references are now permitted in lookbehind assertions when there are
225no duplicated group numbers (that is, (?| has not been used), and, if the
226reference is by name, there is only one group of that name. The referenced
227group must, of course be of fixed length.
228
2294. \g{+<number>} (e.g. \g{+2} ) is now supported. It is a "forward back
230reference" and can be useful in repetitions (compare \g{-<number>} ). Perl does
231not recognize this syntax.
232
2335. pcre2grep now automatically expands its buffer up to a maximum set by
234--max-buffer-size.
235
2366. The -t option (grand total) has been added to pcre2grep.
237
2387. A new function called pcre2_code_copy_with_tables() exists to copy a
239compiled pattern along with a private copy of the character tables that is
240uses.
241
2428. A user supplied a number of patches to upgrade pcre2grep under Windows and
243tidy the code.
244
2459. Several updates have been made to pcre2test and test scripts (see
246ChangeLog).
247
248
Janis Danisevskis8b979b22016-08-15 16:09:16 +0100249Version 10.22 29-July-2016
250--------------------------
251
2521. ChangeLog has the details of a number of bug fixes.
253
2542. The POSIX wrapper function regcomp() did not used to support back references
255and subroutine calls if called with the REG_NOSUB option. It now does.
256
2573. A new function, pcre2_code_copy(), is added, to make a copy of a compiled
258pattern.
259
2604. Support for string callouts is added to pcre2grep.
261
2625. Added the PCRE2_NO_JIT option to pcre2_match().
263
2646. The pcre2_get_error_message() function now returns with a negative error
265code if the error number it is given is unknown.
266
2677. Several updates have been made to pcre2test and test scripts (see
268ChangeLog).
269
270
Janis Danisevskis53e448c2016-03-31 13:35:25 +0100271Version 10.21 12-January-2016
272-----------------------------
273
2741. Many bugs have been fixed. A large number of them were provoked only by very
275strange pattern input, and were discovered by fuzzers. Some others were
276discovered by code auditing. See ChangeLog for details.
277
2782. The Unicode tables have been updated to Unicode version 8.0.0.
279
2803. For Perl compatibility in EBCDIC environments, ranges such as a-z in a
281class, where both values are literal letters in the same case, omit the
282non-letter EBCDIC code points within the range.
283
2844. There have been a number of enhancements to the pcre2_substitute() function,
285giving more flexibility to replacement facilities. It is now also possible to
286cause the function to return the needed buffer size if the one given is too
287small.
288
2895. The PCRE2_ALT_VERBNAMES option causes the "name" parts of special verbs such
290as (*THEN:name) to be processed for backslashes and to take note of
291PCRE2_EXTENDED.
292
2936. PCRE2_INFO_HASBACKSLASHC makes it possible for a client to find out if a
294pattern uses \C, and --never-backslash-C makes it possible to compile a version
295PCRE2 in which the use of \C is always forbidden.
296
2977. A limit to the length of pattern that can be handled can now be set by
298calling pcre2_set_max_pattern_length().
299
3008. When matching an unanchored pattern, a match can be required to begin within
301a given number of code units after the start of the subject by calling
302pcre2_set_offset_limit().
303
3049. The pcre2test program has been extended to test new facilities, and it can
305now run the tests when LF on its own is not a valid newline sequence.
306
30710. The RunTest script has also been updated to enable more tests to be run.
308
30911. There have been some minor performance enhancements.
310
311
312Version 10.20 30-June-2015
313--------------------------
314
3151. Callouts with string arguments and the pcre2_callout_enumerate() function
316have been implemented.
317
3182. The PCRE2_NEVER_BACKSLASH_C option, which locks out the use of \C, is added.
319
3203. The PCRE2_ALT_CIRCUMFLEX option lets ^ match after a newline at the end of a
321subject in multiline mode.
322
3234. The way named subpatterns are handled has been refactored. The previous
324approach had several bugs.
325
3265. The handling of \c in EBCDIC environments has been changed to conform to the
327perlebcdic document. This is an incompatible change.
328
3296. Bugs have been mended, many of them discovered by fuzzers.
330
331
332Version 10.10 06-March-2015
333---------------------------
334
3351. Serialization and de-serialization functions have been added to the API,
336making it possible to save and restore sets of compiled patterns, though
337restoration must be done in the same environment that was used for compilation.
338
3392. The (*NO_JIT) feature has been added; this makes it possible for a pattern
340creator to specify that JIT is not to be used.
341
3423. A number of bugs have been fixed. In particular, bugs that caused building
343on Windows using CMake to fail have been mended.
344
345
346Version 10.00 05-January-2015
347-----------------------------
348
349Version 10.00 is the first release of PCRE2, a revised API for the PCRE
350library. Changes prior to 10.00 are logged in the ChangeLog file for the old
351API, up to item 20 for release 8.36. New programs are recommended to use the
352new library. Programs that use the original (PCRE1) API will need changing
353before linking with the new library.
354
355****