Richard Gomez
11/10/2021, 8:49 PMRegex
vs. Java's Pattern
?Vampire
11/10/2021, 9:05 PMCasey Brooks
11/10/2021, 9:05 PMRegex
class is essentially a multiplatform wrapper around each platform's standard Regex implementation. As such, the specific pattern format may be slightly different between different targets, but on JVM, Regex
delegates to java.util.regex.Pattern
.
So the only difference between Regex
and Pattern
is the actual Kotlin API, not the pattern syntax itself
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/ephemient
11/10/2021, 9:07 PMDominaezzz
11/10/2021, 9:07 PMephemient
11/10/2021, 9:11 PMCasey Brooks
11/10/2021, 9:15 PMDominaezzz
11/10/2021, 9:15 PMRichard Gomez
11/10/2021, 9:52 PMRepresents a compiled regular expression. Provides functions to match strings in text with a pattern, replace the found occurrences and split text around matches.
For pattern syntax reference see Pattern.