Anyone know if theres any particular way to inject...
# announcements
g
Anyone know if theres any particular way to inject our own
Pattern
object to
Regex
although given its a static I don’t think it’d make much of a difference
i
You mean how to convert
java.util.regex.Pattern
to
kotlin.text.Regex
? You can use
Pattern.toRegex()
extension function for that https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/java.util.regex.-pattern/to-regex.html
g
Unfortunately for me I have a different
Pattern
I need to convert to
Regex
. Since
Pattern
isn’t a contract I can’t see a way to get around this