Releases: mnemnion/mvzr
Bugfix: character sets
Correctly handle the case where a hyphen is the final member of the set: adding the character before the hyphen, and the hyphen, instead of just adding the hyphen twice.
Version 0.1
This release adds word boundaries, allows character classes inside character sets, permits a newline to match $
, and otherwise refactors, fixes, and improves mvzr
.
Test coverage is decent, if not yet complete, and it has about as many features as I expect it to. Taking a look at this list of features, most of what isn't supported is a non-goal for mvzr
. There are one or two I might consider.
At this point, you might reasonably expect that, using mvzr
, you're likely to end up with matches for your regular expressions, which resemble what you expect. If not, please file an issue, and I'll see what I can do.
SizedRegex works, deduplicate character sets
This release fixes a function-signature problem with the dispatch functions, where they relied on the size of the default Regex
character sets.
Also deduplicates character sets, meaning more patterns fit in the default size.
Improves group logic, bugfixes, more tests
Group patterns followed by more pattern now check the next match, giving later alternates a chance to succeed if necessary.
Comptime configurable
It is now possible to set the amount of operations and character sets desired, by using SizedRegex(ops, charsets)
with, naturally, comptime-known values.
The amount needed for a given string can be found with resourcesNeeded("comptime regex string")
. I suggest writing these values directly into your program once you know what they are.
Character escaping in sets, `{,N}` syntax.
Not yet added: character classes inside character sets.
Bugfixes and stability
This release refines and simplifies dispatch considerably, restructuring to use a more consistent interface and fewer decisions per branch.
Fix regression in lazy qualifiers
¯_(ツ)_/¯
Possessive and Numbered Qualifiers
mvzr
now supports the accustomed meaning of .*
, .+
, and .?
, with the superior possessive behavior now glossed as .*+
, .++
, and .?+
.
In addition, numbered repetition a{M}
, a{M,}
and a{M,N}
are now supported, either of M
or N
may be up to a u8
in size.
Iteration fixup
Iterator Match bookends will produce the slice from the haystack string.