aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/javascript/reference/global_objects/string/replaceall/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ru/web/javascript/reference/global_objects/string/replaceall/index.html')
-rw-r--r--files/ru/web/javascript/reference/global_objects/string/replaceall/index.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/files/ru/web/javascript/reference/global_objects/string/replaceall/index.html b/files/ru/web/javascript/reference/global_objects/string/replaceall/index.html
index 318e9a30c3..3c4ce6551f 100644
--- a/files/ru/web/javascript/reference/global_objects/string/replaceall/index.html
+++ b/files/ru/web/javascript/reference/global_objects/string/replaceall/index.html
@@ -15,7 +15,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replaceAll
<h2 id="Syntax">Syntax</h2>
-<pre class="syntaxbox notranslate">const newStr = <var>str</var>.replaceAll(<var>regexp</var>|<var>substr</var>, <var>newSubstr</var>|<var>function</var>)
+<pre class="syntaxbox">const newStr = <var>str</var>.replaceAll(<var>regexp</var>|<var>substr</var>, <var>newSubstr</var>|<var>function</var>)
</pre>
<div class="blockIndicator note">
@@ -119,20 +119,20 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replaceAll
<h3 id="Using_replaceAll">Using replaceAll</h3>
-<pre class="brush: js notranslate">'aabbcc'.replaceAll('b', '.');
+<pre class="brush: js">'aabbcc'.replaceAll('b', '.');
// 'aa..cc'</pre>
<h3 id="Non-global_regex_throws">Non-global regex throws</h3>
<p>Поиск с регулярными выражениями должен быть с ("g"). Это не работает:</p>
-<pre class="brush: js; example-bad notranslate">'aabbcc'.replaceAll(/b/, '.');
+<pre class="brush: js; example-bad">'aabbcc'.replaceAll(/b/, '.');
TypeError: replaceAll must be called with a global RegExp
</pre>
<p>Это работает:</p>
-<pre class="brush: js; example-good notranslate">'aabbcc'.replaceAll(/b/g, '.');
+<pre class="brush: js; example-good">'aabbcc'.replaceAll(/b/g, '.');
"aa..cc"
</pre>