W3cubDocs

/Kotlin

RegExp

Platform and version requirements: JS (1.1)
class RegExp

Exposes the JavaScript RegExp object to Kotlin.

Constructors

Platform and version requirements: JS (1.1)

<init>

Exposes the JavaScript RegExp object to Kotlin.

RegExp(pattern: String, flags: String? = definedExternally)

Properties

Platform and version requirements: JS (1.1)

global

val global: Boolean
Platform and version requirements: JS (1.1)

ignoreCase

val ignoreCase: Boolean
Platform and version requirements: JS (1.1)

lastIndex

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

var lastIndex: Int
Platform and version requirements: JS (1.1)

multiline

val multiline: Boolean

Functions

Platform and version requirements: JS (1.1)

exec

fun exec(str: String): RegExpMatch?
Platform and version requirements: JS (1.1)

test

fun test(str: String): Boolean
Platform and version requirements: JS (1.1)

toString

fun toString(): String

Extension Functions

Platform and version requirements: JS (1.1)

reset

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

fun RegExp.reset()

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-reg-exp/index.html