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