October 2018
Intermediate to advanced
370 pages
9h 15m
English
In Kotlin, regular expressions are represented by the Regex class from the kotlin.text package. Instances of this class are immutable, and we can create a new one by using one of the following constructors:
public actual constructor(pattern: String) : this(Pattern.compile(pattern))public actual constructor(pattern: String, option: RegexOption) : this(Pattern.compile(pattern, ensureUnicodeCase(option.value)))public actual constructor(pattern: String, options: Set<RegexOption>) : this(Pattern.compile(pattern, ensureUnicodeCase(options.toInt())))
RegexOption is an enum that we can use to specify any additional options. This defines the following objects:
Read now
Unlock full access