Releases: markwhitaker/RegexToolbox.kt
Releases · markwhitaker/RegexToolbox.kt
New Kotlin DSL-style syntax and improved quantifiers
This release adds a type-safe builder DSL-style syntax so you can now replace this:
val regex = RegexBuilder()
.startGroup()
.letter()
.digit()
.buildRegex() // ERROR! forgot to close group
with this:
val regex = regex {
group {
letter()
digit()
} // Yay! Can't forget to close a group
} // Yay! No need to call buildRegex()
It also makes Quantifiers a bit cleaner. Instead of this:
text(zeroOrMore())
You now do this:
text(ZeroOrMore) // Initial capital (bacause it's now a class), no brackets
Minor new features
- New whitespace element methods:
space()
,tab()
,lineFeed()
,carriageReturn()
,possibleWhitespace()
anyOf()
now takes variable parameters- Deprecated
RegexQuantifier.noneOrOne()
, replaced withzeroOrOne()
Maintenance release
Another maintenance release while getting CI/CD working across all RegexToolbox projects.
Maintenance release
No feature changes, just a maintenance release to bring into line with RegexToolbox.Java and RegexToolbox.NET