We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
String#replaceAll()
String#replace()
1 parent 61e6036 commit 137a43bCopy full SHA for 137a43b
src/projecteuler/problem0017.ts
@@ -12,7 +12,7 @@ function problem0017(init: number, last: number): number {
12
13
for (let i = init; i <= last; i++) {
14
word = numberToWord(i);
15
- replaced = word.replace(/[^a-z0-9]/gi, '');
+ replaced = word.replaceAll(/[^a-z0-9]/gi, '');
16
17
acum += replaced.length;
18
0 commit comments