Releases: mnemnion/mvzr
Patterns which can match the empty string, do
Bugfix patch for 0.3.0
Fixes a couple parsing errors related to grouping multibyte characters.
Version 0.3.0: Multibye modifiers and high-bit ranges.
This release improves multibyte handling. Codepoints are kept together, such that a regex like λ+
now matches "λλλ"
, and ranges and bytes expressed with \x
syntax can cover the whole u8
range, not just the ASCII lower portion of it. With some care this allows for construction of useful character sets, so long as they happen to be dense in the Unicode codepoint spectrum.
Proper ranges of \xXX-\xXX
This corrects a fencepost error, which gave incorrect results for ranges in the form r"[\x01-x3f]"
.
Try to match empty string
This release does a final try to match the empty string, which handles a pattern such as a*$
matching a string like "bbbb"
.
Bug fixes: alt + modifier, Kleene * + subsequent fail
This release fixes one bug in the regex compiler, and one in the matching runtime.
Upgrading is recommended.
Scoped Logging
Compile errors are now scoped in .mvzr
, making it practical to filter them out when desired.
Regex convenience type now public
This release makes the Regex type, which is just SizedRegex(64,8)
, public.
No other changes from v0.2.1
.
Add regex.matchPos
A convenience function which slices the string for you, and adjusts the values in the Match returned to their location in the original haystack string.
Add eager {M,N}+ qualifier
Implements a{M,N}+ I consider this an especially useful eager qualifier to have. It is in the very nature of {M,N} patterns to 'want to' match N when that can be accomplished. I'm in favor of the use of eager/possessives in general, actually. Many cases of greedy qualifiers could be either lazy or eager instead, those which actually split the difference are rare.