toRegex

Common
JVM
JS
Native
1.0
fun String.toRegex(): Regex

Converts the string into a regular expression Regex with the default options.

Common
JVM
JS
Native
1.0
fun String.toRegex(option: RegexOption): Regex

Converts the string into a regular expression Regex with the specified single option.

Common
JVM
JS
Native
1.0
fun String.toRegex(options: Set<RegexOption>): Regex

Converts the string into a regular expression Regex with the specified set of options.