Skip to main content
Module

x/core_fn/mod.ts>lastIndex

A collection of built-in object method and property as currying function
Latest
variable lastIndex
import { lastIndex } from "https://deno.land/x/core_fn@v1.0.0-beta.16/mod.ts";

Returns read/write integer property of RegExp instances that specifies the index at which to start the next match.

Examples

Example 1

const re = /t/g;
exec(re, "test");
lastIndex(re) // 1

type

(regExp: RegExp) => unknown