kotlin-stdlib / kotlin.text / Regex / toString toString JVM JS Native 1.0 fun toString(): String 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.