linear time regular expression matching in Java
RE2/J 1.7 brings some performance improvements and bug fixes:
A couple of new features in this release:
added Pattern.namedGroups()
: returns a map of the capturing groups in the pattern, where key is the name and value is the index of the group in the pattern
added a series of methods in Matcher
to match against UTF-8 bytes
Thank you for the contributions, @j4ckcyw!
This release adds license headers to each source file, plus some build tool changes to ensure that these headers aren't forgotten in the future.
There are no changes to RE2/J's behavior in this release.
This is the 1.4 release of RE2/J. Changes from 1.3 include:
Added new flag Pattern.LONGEST_MATCH
to allow changing hard-coded "longest=false" in Pattern.compile()
(9708be1d64e75cd096352e08724dc596666040dc), thank you @mykeul
Fix handling of truncated two-digit hex escapes (40caa73ea78cbcd111a8a4e4bd60088994de442e, https://github.com/google/re2j/issues/103)
Fix treatment of \Q\E*
(26ea8906027ff7b60e68d670da99744aa91fff75, https://github.com/google/re2j/issues/92)
Fix factoring of common prefixes in alternations (7fce5277c4820f8704a01a155a7a350c16ba5fa9, https://github.com/google/re2j/issues/93)
Fix zero-width assertions in capture group eval (0a7c5df677aba8366d012c134ecbdd92124f8c42, https://github.com/google/re2j/issues/96)
Eliminate runtime binary search in simpleCodeFold (83ae537508c8948c3fda173e28a353b344cfb098), thank you @mykeul
Thank you @EricEdens for porting the benchmarks to JMH.
Thank you to those listed above and to all the other contributors and bug reporters.
This is the 1.3 release of RE2/J. Changes from 1.2 include:
Character.toLowerCase()
and toUpperCase
instead of UnicodeTables.CASE_RANGES
(06d4a720e12673e78be99e5f16bd6c800a7c01ab), issue #78, courtesy of @ringwMachine
(fc83bf793e8dfb6af091ffb1a1632ad59e09bd44), issue #85RE2J.gwt.xml
and supersourced files to the source jar ( 097e2a1048d7fad915dddd06f0f9e84cc145b429), courtesy of @tjgqThank you to those listed above and to all the other contributors and bug reporters.
Changes since 1.1:
use readResolve
method to fill in transient re2 field (fixes NPE when using
deserialized Pattern objects)
various javadoc fixes
add Matcher.quoteReplacement
add StringBuilder overloads of Matcher methods
always set input sequence length on Matcher.reset()
This is a bugfix release of RE2/J. It addresses:
NullPointerException
in Pattern
deserialization (issue https://github.com/google/re2j/issues/3)The first binary release of RE2/J.