1 |
News about PCRE releases
|
2 |
------------------------
|
3 |
|
4 |
Release 6.0 07-Jun-05
|
5 |
---------------------
|
6 |
|
7 |
The release number has been increased to 6.0 because of the addition of several
|
8 |
major new pieces of functionality.
|
9 |
|
10 |
A new function, pcre_dfa_exec(), which implements pattern matching using a DFA
|
11 |
algorithm, has been added. This has a number of advantages for certain cases,
|
12 |
though it does run more slowly, and lacks the ability to capture substrings. On
|
13 |
the other hand, it does find all matches, not just the first, and it works
|
14 |
better for partial matching. The pcrematching man page discusses the
|
15 |
differences.
|
16 |
|
17 |
The pcretest program has been enhanced so that it can make use of the new
|
18 |
pcre_dfa_exec() matching function and the extra features it provides.
|
19 |
|
20 |
The distribution now includes a C++ wrapper library. This is built
|
21 |
automatically if a C++ compiler is found. The pcrecpp man page discusses this
|
22 |
interface.
|
23 |
|
24 |
The code itself has been re-organized into many more files, one for each
|
25 |
function, so it no longer requires everything to be linked in when static
|
26 |
linkage is used. As a consequence, some internal functions have had to have
|
27 |
their names exposed. These functions all have names starting with _pcre_. They
|
28 |
are undocumented, and are not intended for use by outside callers.
|
29 |
|
30 |
The pcregrep program has been enhanced with new functionality such as
|
31 |
multiline-matching and options for output more matching context. See the
|
32 |
ChangeLog for a complete list of changes to the library and the utility
|
33 |
programs.
|
34 |
|
35 |
|
36 |
Release 5.0 13-Sep-04
|
37 |
---------------------
|
38 |
|
39 |
The licence under which PCRE is released has been changed to the more
|
40 |
conventional "BSD" licence.
|
41 |
|
42 |
In the code, some bugs have been fixed, and there are also some major changes
|
43 |
in this release (which is why I've increased the number to 5.0). Some changes
|
44 |
are internal rearrangements, and some provide a number of new facilities. The
|
45 |
new features are:
|
46 |
|
47 |
1. There's an "automatic callout" feature that inserts callouts before every
|
48 |
item in the regex, and there's a new callout field that gives the position
|
49 |
in the pattern - useful for debugging and tracing.
|
50 |
|
51 |
2. The extra_data structure can now be used to pass in a set of character
|
52 |
tables at exec time. This is useful if compiled regex are saved and re-used
|
53 |
at a later time when the tables may not be at the same address. If the
|
54 |
default internal tables are used, the pointer saved with the compiled
|
55 |
pattern is now set to NULL, which means that you don't need to do anything
|
56 |
special unless you are using custom tables.
|
57 |
|
58 |
3. It is possible, with some restrictions on the content of the regex, to
|
59 |
request "partial" matching. A special return code is given if all of the
|
60 |
subject string matched part of the regex. This could be useful for testing
|
61 |
an input field as it is being typed.
|
62 |
|
63 |
4. There is now some optional support for Unicode character properties, which
|
64 |
means that the patterns items such as \p{Lu} and \X can now be used. Only
|
65 |
the general category properties are supported. If PCRE is compiled with this
|
66 |
support, an additional 90K data structure is include, which increases the
|
67 |
size of the library dramatically.
|
68 |
|
69 |
5. There is support for saving compiled patterns and re-using them later.
|
70 |
|
71 |
6. There is support for running regular expressions that were compiled on a
|
72 |
different host with the opposite endianness.
|
73 |
|
74 |
7. The pcretest program has been extended to accommodate the new features.
|
75 |
|
76 |
The main internal rearrangement is that sequences of literal characters are no
|
77 |
longer handled as strings. Instead, each character is handled on its own. This
|
78 |
makes some UTF-8 handling easier, and makes the support of partial matching
|
79 |
possible. Compiled patterns containing long literal strings will be larger as a
|
80 |
result of this change; I hope that performance will not be much affected.
|
81 |
|
82 |
|
83 |
Release 4.5 01-Dec-03
|
84 |
---------------------
|
85 |
|
86 |
Again mainly a bug-fix and tidying release, with only a couple of new features:
|
87 |
|
88 |
1. It's possible now to compile PCRE so that it does not use recursive
|
89 |
function calls when matching. Instead it gets memory from the heap. This slows
|
90 |
things down, but may be necessary on systems with limited stacks.
|
91 |
|
92 |
2. UTF-8 string checking has been tightened to reject overlong sequences and to
|
93 |
check that a starting offset points to the start of a character. Failure of the
|
94 |
latter returns a new error code: PCRE_ERROR_BADUTF8_OFFSET.
|
95 |
|
96 |
3. PCRE can now be compiled for systems that use EBCDIC code.
|
97 |
|
98 |
|
99 |
Release 4.4 21-Aug-03
|
100 |
---------------------
|
101 |
|
102 |
This is mainly a bug-fix and tidying release. The only new feature is that PCRE
|
103 |
checks UTF-8 strings for validity by default. There is an option to suppress
|
104 |
this, just in case anybody wants that teeny extra bit of performance.
|
105 |
|
106 |
|
107 |
Releases 4.1 - 4.3
|
108 |
------------------
|
109 |
|
110 |
Sorry, I forgot about updating the NEWS file for these releases. Please take a
|
111 |
look at ChangeLog.
|
112 |
|
113 |
|
114 |
Release 4.0 17-Feb-03
|
115 |
---------------------
|
116 |
|
117 |
There have been a lot of changes for the 4.0 release, adding additional
|
118 |
functionality and mending bugs. Below is a list of the highlights of the new
|
119 |
functionality. For full details of these features, please consult the
|
120 |
documentation. For a complete list of changes, see the ChangeLog file.
|
121 |
|
122 |
1. Support for Perl's \Q...\E escapes.
|
123 |
|
124 |
2. "Possessive quantifiers" ?+, *+, ++, and {,}+ which come from Sun's Java
|
125 |
package. They provide some syntactic sugar for simple cases of "atomic
|
126 |
grouping".
|
127 |
|
128 |
3. Support for the \G assertion. It is true when the current matching position
|
129 |
is at the start point of the match.
|
130 |
|
131 |
4. A new feature that provides some of the functionality that Perl provides
|
132 |
with (?{...}). The facility is termed a "callout". The way it is done in PCRE
|
133 |
is for the caller to provide an optional function, by setting pcre_callout to
|
134 |
its entry point. To get the function called, the regex must include (?C) at
|
135 |
appropriate points.
|
136 |
|
137 |
5. Support for recursive calls to individual subpatterns. This makes it really
|
138 |
easy to get totally confused.
|
139 |
|
140 |
6. Support for named subpatterns. The Python syntax (?P<name>...) is used to
|
141 |
name a group.
|
142 |
|
143 |
7. Several extensions to UTF-8 support; it is now fairly complete. There is an
|
144 |
option for pcregrep to make it operate in UTF-8 mode.
|
145 |
|
146 |
8. The single man page has been split into a number of separate man pages.
|
147 |
These also give rise to individual HTML pages which are put in a separate
|
148 |
directory. There is an index.html page that lists them all. Some hyperlinking
|
149 |
between the pages has been installed.
|
150 |
|
151 |
|
152 |
Release 3.5 15-Aug-01
|
153 |
---------------------
|
154 |
|
155 |
1. The configuring system has been upgraded to use later versions of autoconf
|
156 |
and libtool. By default it builds both a shared and a static library if the OS
|
157 |
supports it. You can use --disable-shared or --disable-static on the configure
|
158 |
command if you want only one of them.
|
159 |
|
160 |
2. The pcretest utility is now installed along with pcregrep because it is
|
161 |
useful for users (to test regexs) and by doing this, it automatically gets
|
162 |
relinked by libtool. The documentation has been turned into a man page, so
|
163 |
there are now .1, .txt, and .html versions in /doc.
|
164 |
|
165 |
3. Upgrades to pcregrep:
|
166 |
(i) Added long-form option names like gnu grep.
|
167 |
(ii) Added --help to list all options with an explanatory phrase.
|
168 |
(iii) Added -r, --recursive to recurse into sub-directories.
|
169 |
(iv) Added -f, --file to read patterns from a file.
|
170 |
|
171 |
4. Added --enable-newline-is-cr and --enable-newline-is-lf to the configure
|
172 |
script, to force use of CR or LF instead of \n in the source. On non-Unix
|
173 |
systems, the value can be set in config.h.
|
174 |
|
175 |
5. The limit of 200 on non-capturing parentheses is a _nesting_ limit, not an
|
176 |
absolute limit. Changed the text of the error message to make this clear, and
|
177 |
likewise updated the man page.
|
178 |
|
179 |
6. The limit of 99 on the number of capturing subpatterns has been removed.
|
180 |
The new limit is 65535, which I hope will not be a "real" limit.
|
181 |
|
182 |
|
183 |
Release 3.3 01-Aug-00
|
184 |
---------------------
|
185 |
|
186 |
There is some support for UTF-8 character strings. This is incomplete and
|
187 |
experimental. The documentation describes what is and what is not implemented.
|
188 |
Otherwise, this is just a bug-fixing release.
|
189 |
|
190 |
|
191 |
Release 3.0 01-Feb-00
|
192 |
---------------------
|
193 |
|
194 |
1. A "configure" script is now used to configure PCRE for Unix systems. It
|
195 |
builds a Makefile, a config.h file, and the pcre-config script.
|
196 |
|
197 |
2. PCRE is built as a shared library by default.
|
198 |
|
199 |
3. There is support for POSIX classes such as [:alpha:].
|
200 |
|
201 |
5. There is an experimental recursion feature.
|
202 |
|
203 |
----------------------------------------------------------------------------
|
204 |
IMPORTANT FOR THOSE UPGRADING FROM VERSIONS BEFORE 2.00
|
205 |
|
206 |
Please note that there has been a change in the API such that a larger
|
207 |
ovector is required at matching time, to provide some additional workspace.
|
208 |
The new man page has details. This change was necessary in order to support
|
209 |
some of the new functionality in Perl 5.005.
|
210 |
|
211 |
IMPORTANT FOR THOSE UPGRADING FROM VERSION 2.00
|
212 |
|
213 |
Another (I hope this is the last!) change has been made to the API for the
|
214 |
pcre_compile() function. An additional argument has been added to make it
|
215 |
possible to pass over a pointer to character tables built in the current
|
216 |
locale by pcre_maketables(). To use the default tables, this new arguement
|
217 |
should be passed as NULL.
|
218 |
|
219 |
IMPORTANT FOR THOSE UPGRADING FROM VERSION 2.05
|
220 |
|
221 |
Yet another (and again I hope this really is the last) change has been made
|
222 |
to the API for the pcre_exec() function. An additional argument has been
|
223 |
added to make it possible to start the match other than at the start of the
|
224 |
subject string. This is important if there are lookbehinds. The new man
|
225 |
page has the details, but you just want to convert existing programs, all
|
226 |
you need to do is to stick in a new fifth argument to pcre_exec(), with a
|
227 |
value of zero. For example, change
|
228 |
|
229 |
pcre_exec(pattern, extra, subject, length, options, ovec, ovecsize)
|
230 |
to
|
231 |
pcre_exec(pattern, extra, subject, length, 0, options, ovec, ovecsize)
|
232 |
|
233 |
****
|