Skip to content

Commit 25d9143

Browse files
committed
Added replaceAll() to results
1 parent 9fe98a6 commit 25d9143

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ function serveTest(query, response)
272272
html.push("\t\t\t<th style=\"text-align:center;\">Test</th>\n");
273273
html.push("\t\t\t<th>Input</th>");
274274
html.push("\t\t\t<th>input.replace()</th>");
275+
html.push("\t\t\t<th>input.replaceAll()</th>");
275276
html.push("\t\t\t<th>input.split()[]</th>");
276277
html.push("\t\t\t<th>regex.test()</th>");
277278
html.push("\t\t\t<th>regex.exec().index</th>");
@@ -309,6 +310,10 @@ function serveTest(query, response)
309310
html.push(h(input.replace(new RegExp(str_regex, str_options), replacement == null ? "" : replacement)));
310311
html.push("</td>\n");
311312

313+
html.push('\t\t\t<td>');
314+
html.push(h(input.replaceAll(new RegExp(str_regex, str_options), replacement == null ? "" : replacement)));
315+
html.push("</td>\n");
316+
312317
html.push('\t\t\t<td>');
313318
var splits = input.split(new RegExp(str_regex, str_options));
314319
for (var split = 0; split < splits.length; split++)

0 commit comments

Comments
 (0)