RegExp

external class RegExp(pattern: String, flags: String? = definedExternally)(source)

Exposes the JavaScript RegExp object to Kotlin.

Since Kotlin

1.1

Constructors

Link copied to clipboard
constructor(pattern: String, flags: String? = definedExternally)

Properties

Link copied to clipboard
external val global: Boolean
Since Kotlin 1.1
Link copied to clipboard
external val ignoreCase: Boolean
Since Kotlin 1.1
Link copied to clipboard
external var lastIndex: Int

The lastIndex is a read/write integer property of regular expressions that specifies the index at which to start the next match.

Since Kotlin 1.1
Link copied to clipboard
external val multiline: Boolean
Since Kotlin 1.1

Functions

Link copied to clipboard
external fun exec(str: String): RegExpMatch?
Since Kotlin 1.1
Link copied to clipboard

Resets the regular expression so that subsequent RegExp.test and RegExp.exec calls will match starting with the beginning of the input string.

Since Kotlin 1.1
Link copied to clipboard
external fun test(str: String): Boolean
Since Kotlin 1.1
Link copied to clipboard
open external override fun toString(): String

Returns a string representation of the object.

Since Kotlin 1.1