We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08c923e commit 02514feCopy full SHA for 02514fe
1 file changed
mmrpc-runtime/src/commonMain/kotlin/CanonicalName.kt
@@ -43,8 +43,8 @@ value class CanonicalName(val value: String) : Comparable<CanonicalName> {
43
}
44
45
companion object {
46
- val SEGMENT_REGEXP = Regex("[A-Za-z][A-Za-z0-9_-]*")
47
- val REGEXP = Regex("([A-Za-z][A-Za-z0-9_-]*)(\\.[A-Za-z][A-Za-z0-9_-]*)*")
+ val SEGMENT_REGEXP = Regex("-?[A-Za-z][A-Za-z0-9_]*")
+ val REGEXP = Regex("(-?[A-Za-z][A-Za-z0-9_]*)(\\.-?[A-Za-z][A-Za-z0-9_]*)*")
48
49
50
inline val name get() = value.substringAfterLast(".")
0 commit comments