Skip to content

Releases: markwhitaker/RegexToolbox.kt

New Kotlin DSL-style syntax and improved quantifiers

01 Sep 09:54
453537a
Compare
Choose a tag to compare

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

18 Aug 19:03
0a8d5e9
Compare
Choose a tag to compare
  • New whitespace element methods: space(), tab(), lineFeed(), carriageReturn(), possibleWhitespace()
  • anyOf() now takes variable parameters
  • Deprecated RegexQuantifier.noneOrOne(), replaced with zeroOrOne()

Maintenance release

18 Aug 12:52
b5384bd
Compare
Choose a tag to compare

Another maintenance release while getting CI/CD working across all RegexToolbox projects.

Maintenance release

18 Aug 08:26
Compare
Choose a tag to compare

No feature changes, just a maintenance release to bring into line with RegexToolbox.Java and RegexToolbox.NET