diff --git a/files/en-us/web/javascript/reference/global_objects/regexp/index.html b/files/en-us/web/javascript/reference/global_objects/regexp/index.html index f6b3e22577056f6..dbd8ee8661395d2 100644 --- a/files/en-us/web/javascript/reference/global_objects/regexp/index.html +++ b/files/en-us/web/javascript/reference/global_objects/regexp/index.html @@ -50,7 +50,7 @@

Flags in constructor

Perl-like RegExp properties

-

Note that several of the {{JSxRef("RegExp")}} properties have both long and short (Perl-like) names. Both names always refer to the same value. (Perl is the programming language from which JavaScript modeled its regular expressions.). See also deprecated RegExp properties.

+

Note that several of the {{JSxRef("RegExp")}} properties have both long and short (Perl-like) names. Both names always refer to the same value. (Perl is the programming language from which JavaScript modeled its regular expressions.). See also deprecated RegExp properties.

Constructor

@@ -64,8 +64,6 @@

Static properties

{{jsxref("RegExp.@@species", "get RegExp[@@species]")}}
The constructor function that is used to create derived objects.
-
{{jsxref("RegExp.lastIndex")}}
-
The index at which to start the next match.

Instance properties

@@ -87,6 +85,8 @@

Instance properties

Whether or not the search is sticky.
{{JSxRef("RegExp.prototype.unicode")}}
Whether or not Unicode features are enabled.
+
{{jsxref("RegExp.lastIndex", "RegExp: lastIndex")}}
+
The index at which to start the next match.

Instance methods

diff --git a/files/en-us/web/javascript/reference/global_objects/regexp/lastindex/index.html b/files/en-us/web/javascript/reference/global_objects/regexp/lastindex/index.html index 365ae708cd1836f..b0f65ffdbbd51bc 100644 --- a/files/en-us/web/javascript/reference/global_objects/regexp/lastindex/index.html +++ b/files/en-us/web/javascript/reference/global_objects/regexp/lastindex/index.html @@ -1,5 +1,5 @@ --- -title: RegExpInstance.lastIndex +title: 'RegExp: lastIndex' slug: Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex tags: - JavaScript @@ -10,7 +10,9 @@ ---
{{JSRef}}
-

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

+

lastIndex is a read/write integer property of {{jsXref("RegExp")}} instances that specifies the index at which to start the next match.

+ +

Note that lastIndex is not a property of the {{jsXref("RegExp")}} prototype but is instead only exposed from {{jsXref("RegExp")}} instances.

{{EmbedInteractiveExample("pages/js/regexp-lastindex.html")}}
@@ -60,7 +62,7 @@

Specifications

- {{SpecName('ESDraft', '#sec-properties-of-regexp-instances', 'RegExp.lastIndex')}} + {{SpecName('ESDraft', '#sec-properties-of-regexp-instances', 'lastIndex')}}