aboutsummaryrefslogtreecommitdiff
path: root/files/pl/web/javascript/reference/global_objects/regexp/lastmatch/index.html
diff options
context:
space:
mode:
authorFlorian Dieminger <me@fiji-flo.de>2021-02-11 18:26:59 +0100
committerGitHub <noreply@github.com>2021-02-11 18:26:59 +0100
commit7a94b4d8daf297eda6df8e5cf933f7ba159bbc76 (patch)
treec8c8a36c41beda7a4c150927b2b5c7d2a09837bd /files/pl/web/javascript/reference/global_objects/regexp/lastmatch/index.html
parentab718192b92d5cc38c1114e055a435a6de7dd8ef (diff)
parentb8170f78422f2269dfc9df7760cc1ad51c048c00 (diff)
downloadtranslated-content-7a94b4d8daf297eda6df8e5cf933f7ba159bbc76.tar.gz
translated-content-7a94b4d8daf297eda6df8e5cf933f7ba159bbc76.tar.bz2
translated-content-7a94b4d8daf297eda6df8e5cf933f7ba159bbc76.zip
Merge pull request #38 from fiji-flo/unslugging-pl
Unslugging pl
Diffstat (limited to 'files/pl/web/javascript/reference/global_objects/regexp/lastmatch/index.html')
-rw-r--r--files/pl/web/javascript/reference/global_objects/regexp/lastmatch/index.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/files/pl/web/javascript/reference/global_objects/regexp/lastmatch/index.html b/files/pl/web/javascript/reference/global_objects/regexp/lastmatch/index.html
new file mode 100644
index 0000000000..f9f1c9a129
--- /dev/null
+++ b/files/pl/web/javascript/reference/global_objects/regexp/lastmatch/index.html
@@ -0,0 +1,55 @@
+---
+title: RegExp.lastMatch ($&)
+slug: Web/JavaScript/Reference/Global_Objects/RegExp/lastMatch
+translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/lastMatch
+original_slug: Web/JavaScript/Referencje/Obiekty/RegExp/lastMatch
+---
+<div>{{JSRef}} {{non-standard_header}}</div>
+
+<p>Niestandardowa właściwość <strong>lastMatch</strong> jest właściwością statyczną, tylko do odczytu wyrażeń regularnych, który zawiera ostatnie dopasowane znaki. <code>RegExp.$&amp;</code> jest aliasem tej właściwości.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox"><var>RegExp</var>.lastMatch
+RegExp['$&amp;']
+</pre>
+
+<h2 id="Description">Description</h2>
+
+<p>The <code>lastMatch</code> property is static, it is not a property of an individual regular expression object. Instead, you always use it as <code>RegExp.lastMatch</code> or <code>RegExp['$&amp;'].</code></p>
+
+<p>The value of the <code>lastMatch</code> property is read-only and modified whenever a successful match is made.</p>
+
+<p>You can not use the shorthand alias with the dot property accessor (<code>RegExp.$&amp;</code>), because the parser expects an expression with "&amp;" in that case and a {{jsxref("SyntaxError")}} is thrown. Use the <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors">bracket notation for property access</a>.</p>
+
+<h2 id="Examples">Examples</h2>
+
+<h3 id="Using_lastMatch_and">Using <code>lastMatch</code> and <code>$&amp;</code></h3>
+
+<pre class="brush: js">var re = /hi/g;
+re.test('hi there!');
+RegExp.lastMatch; // "hi"
+RegExp['$&amp;']; // "hi"
+</pre>
+
+<h2 id="Specifications">Specifications</h2>
+
+<p>Niestandardowe. Nie jest częścią aktualnej specyfikacji.</p>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.RegExp.lastMatch")}}</p>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{non-standard_inline}} {{jsxref("RegExp.input", "RegExp.input ($_)")}}</li>
+ <li>{{non-standard_inline}} {{jsxref("RegExp.lastParen", "RegExp.lastParen ($+)")}}</li>
+ <li>{{non-standard_inline}} {{jsxref("RegExp.leftContext", "RegExp.leftContext ($`)")}}</li>
+ <li>{{non-standard_inline}} {{jsxref("RegExp.rightContext", "RegExp.rightContext ($')")}}</li>
+ <li>{{non-standard_inline}} {{jsxref("RegExp.n", "RegExp.$1-$9")}}</li>
+</ul>