kotlin-stdlib / kotlin.text / Regex / toString toString JVM JS Native 1.0 fun toString(): String(JVM source) (JS source) (Native source) Returns the string representation of this regular expression, namely the pattern of this regular expression. Note that another regular expression constructed from the same pattern string may have different options and may match strings differently.