New
0.2.7
This release includes a ground-up rewrite of the regex-syntax crate, which has been in development for over a year.
New features:
- Error messages for invalid regexes have been greatly improved. You get these automatically; you don't need to do anything. In addition to better formatting, error messages will now explicitly call out the use of look around. When regex 1.0 is released, this will happen for backreferences as well.
- Full support for intersection, difference and symmetric difference of
character classes. These can be used via the
&&,--and~~binary operators within classes. - A Unicode Level 1 conformat implementation of
\p{..}character classes. Things like\p{scx:Hira},\p{age:3.2}or\p{Changes_When_Casefolded}now work. All property name and value aliases are supported, and properties are selected via loose matching. e.g.,\p{Greek}is the same as\p{G r E e K}. - A new
UNICODE.mddocument has been added to this repository that exhaustively documents support for UTS#18. - Empty sub-expressions are now permitted in most places. That is,
()+is now a valid regex. - Almost everything in regex-syntax now uses constant stack space, even when performing anaylsis that requires structural induction. This reduces the risk of a user provided regular expression causing a stack overflow.
- FEATURE #174:
The
Asttype inregex-syntaxnow contains span information. - FEATURE #424:
Support
\u,\u{...},\Uand\U{...}syntax for specifying code points in a regular expression. - FEATURE #449:
Add a
Replace::by_refadapter for use of a replacer without consuming it.
Bug fixes:
- BUG #446: We re-enable the Boyer-Moore literal matcher.