You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Remove deprecated features
Remove public constructor to enforce `regex { }` syntax.
Remove start/end group methods to enforce `group { }` syntax.
Remove logging.
* Updated README.md for 3.0
Version 2.0 introduces a simplified [type-safe builder syntax](https://kotlinlang.org/docs/reference/type-safe-builders.html) for cleaner, less error-prone and more Kotliny code. Go from this:
65
-
66
-
```kotlin
67
-
val regex =RegexBuilder()
68
-
.startGroup()
69
-
.letter()
70
-
.digit()
71
-
.buildRegex() // ERROR: forgot to call endGroup()
72
-
```
22
+
|Removed|Replaced with|
23
+
|---|---|
24
+
|`RegexBuilder()` public constructor|`regex { ... }`|
|`addLogger()`|No replacement: logging has been removed.|
73
31
74
-
to this:
32
+
In a nutshell: the old Java-style is completed removed in 3.0.
33
+
RegexToolbox.kt now exclusively uses the new [type-safe builder syntax](https://kotlinlang.org/docs/reference/type-safe-builders.html) introduced in 2.0, for example:
75
34
76
35
```kotlin
77
36
val regex = regex {
@@ -82,23 +41,6 @@ val regex = regex {
82
41
} // Yay! No need to call buildRegex()
83
42
```
84
43
85
-
The old syntax is still supported if that's your preference (and for consistency with the sibling projects listed at the bottom of the page).
86
-
87
-
### Quantifiers
88
-
89
-
`RegexQuantifier` is now a sealed class and its methods have become objects or classes. The old syntax is still supported but deprecated and will be removed in a future version.
0 commit comments