package gnu.regexp - Regular Expressions for Java

`package gnu.regexp;`

Change History
This page was last updated on 21 March 1999

1.0.8 (21 March 1999)
Fixed handling of POSIX character classes (not used in default syntax).
Added Tap, the evil water droplet, to the home page (thanks to Jim Blair, corvus@gnu.org).
Changed the demo applet to support selectable syntax.

1.0.7 (3 March 1999)
Fixed NullPointerException when compiling expressions starting with '+' or '*'.
Fixed reporting of subexpression start indices in certain cases.
Removed static initializer in REToken.java to aid in compiling on non-compliant platforms.
Fixed endless loop caused by array read in REFilterInputStream.
Fixed ArrayIndexOutOfBoundsExceptions that could be thrown from REMatch.toString(int).
Updated all doc comment versions to 1.0.7.
Added a few tests to the test cottage (it's not big enough to be a suite).

1.0.6 (18 November 1998)
Fixed bug in subexpression position reporting.
Fixed some bugs with zero-length regular expressions.
More documentation for gnu.regexp.util classes.
Makefile changes for Cygwin compatibility.
Added credits.html file.
Fixed paths to API docs in HTML.

1.0.5 (8 November 1998)
Added gnu.regexp.REFilterInputStream class.
New directory structure for distribution.
Added gnu.regexp.util.Tests class, a limited testsuite.
Fixed bug in backreferences (\1, \2...) introduced in 1.0.4.
Fixed bug in handling of literal '-' within bracketed lists.
Changes to Makefile to work with Cygnus/Win32 systems.
General enhancements to Makefile.
Added TODO and CONTENTS files to distribution.
Added support for Perl5 escapes (\w,\d,\s, etc.) within bracketed lists.
Added matching syntax bit, RE_CHAR_CLASS_ESC_IN_LISTS.

1.0.4 (8 October 1998)
Added getMinimumLength method.
Added Makefile to distribution.
Added HTML to distribution.
Added gnu/regexp/util/REApplet.java demo applet to distribution.
Added support for pure grouping (?:...) operator.
Added support for comment (?#...) operator.
Minor changes for compatibility with guavac compiler.
Fixed some quirks with including dashes in lists.
Fixed some documentation errors.
Fixed 1.0.3 bug in REMatch reporting skipped subexpressions.
Fixed some major problems with alternation nested in subexpressions.
Fixed some pathological cases that would cause infinite loops.

1.0.3 (19 August 1998)
Added REMatchEnumeration and getMatchEnumeration methods.
Added support for compiling patterns from StringBuffers.
Added support for matching, substituting, searching against StringBuffer, char[] and InputStream.
Added toString(int) to REMatch to get subexpression matches easily.
Added getMatch() with StringBuffer argument to save contents leading up to a match.
substitute() and substituteAll() can now take $0 - $9 metacharacters.
General optimizations.
Source code cleanup, toward GNU coding standards.
More and better javadoc documentation.
getAllMatches() now returns non-overlapping matches as it should.
All classes in 1.0.3 are JDK 1.0.2 compatible and should work in applets.
RETest is no longer in the JAR as it is not needed in an execution environment. Source code is provided in the gnu/regexp/util directory.
gnu/regexp/util also contains a pure-Java implementation of GNU grep and egrep, for your amusement and use on non-GNU operating systems which lack such rudimentary text processing facilities. Grep and Egrep require gnu.getopt to compile and run.
Note that due to certain API changes, you will need to recompile any source code that uses gnu.regexp against the 1.0.3 classes. No code changes are necessary.

1.02a (23 July 1998)
No code changes. Added README, changed LICENSE to LGPL and changed copyright messages on source files. JAR file compiled with -O flag.

1.02 (15 June 1998)
Support for nested subexpressions. More debugging support. Fixed bug when escaping braces with a backslash.

1.01 (1 June 1998)
Fixed bug in list operator ( [...] ) which was causing the RE compiler to interpret the closing ']' as a literal.

1.00 (22 May 1998)
New API using RESyntax. New framework for "multiline" and "single line" matching. Default support for most Perl 5 constructs, including the following operators: \A, \d, \D, \w, \W, \s, \S, \Z, stingy matching (*?, ??, +?). Some string optimizations should speed up most matches. REG_NEWLINE wasn't working correctly in 0.07, it's gone and replaced by REG_MULTILINE (semantics matching Perl's "/m" operator). Support for POSIX character classes such as [:alpha:] within lists. General code cleanup and added comments.

0.07 (10 April 1998)
Added more default-argument versions of methods; added REG_ANCHORINDEX flag for substring processing; fixed bug in isMatch() for expressions with top-level branches; fixed bug in getMatch() for zero-length input never matching.

0.06 (3 March 1998)
First general release.

[gnu.regexp] [syntax and usage] [api documentation] [test applet] [credits]